blacklist-win32.phpt 885 B

12345678910111213141516171819202122232425262728293031323334
  1. --TEST--
  2. Blacklist (with glob, quote and comments)
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.blacklist_filename={PWD}/opcache-*.blacklist
  7. opcache.file_update_protection=0
  8. --SKIPIF--
  9. <?php require_once('skipif.inc'); ?>
  10. <?php if (substr(PHP_OS, 0, 3) != 'WIN') { die('skip only for Windows'); } ?>
  11. --FILE--
  12. <?php
  13. $conf = opcache_get_configuration();
  14. $conf = $conf['blacklist'];
  15. $conf[3] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[3]);
  16. $conf[4] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[4]);
  17. print_r($conf);
  18. include("blacklist.inc");
  19. $status = opcache_get_status();
  20. print_r(count($status['scripts']));
  21. ?>
  22. --EXPECTF--
  23. Array
  24. (
  25. [0] => C:\path\to\foo
  26. [1] => C:\path\to\foo2
  27. [2] => C:\path\to\bar
  28. [3] => __DIR__\blacklist.inc
  29. [4] => __DIR__\current.php
  30. [5] => %scurrent.php
  31. [6] => %scurrent.php
  32. )
  33. ok
  34. 1