blacklist-win32.phpt 882 B

123456789101112131415161718192021222324252627282930313233343536
  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. opcache.file_cache_only=0
  9. --EXTENSIONS--
  10. opcache
  11. --SKIPIF--
  12. <?php if (substr(PHP_OS, 0, 3) != 'WIN') { die('skip only for Windows'); } ?>
  13. --FILE--
  14. <?php
  15. $conf = opcache_get_configuration();
  16. $conf = $conf['blacklist'];
  17. $conf[3] = preg_replace("!^\\Q".__DIR__."\\E!", "__DIR__", $conf[3]);
  18. $conf[4] = preg_replace("!^\\Q".__DIR__."\\E!", "__DIR__", $conf[4]);
  19. print_r($conf);
  20. include("blacklist.inc");
  21. $status = opcache_get_status();
  22. print_r(count($status['scripts']) > 0);
  23. ?>
  24. --EXPECTF--
  25. Array
  26. (
  27. [0] => %c:\path\to\foo
  28. [1] => %c:\path\to\foo2
  29. [2] => %c:\path\to\bar
  30. [3] => __DIR__\blacklist.inc
  31. [4] => __DIR__\current.php
  32. [5] => %scurrent.php
  33. [6] => %scurrent.php
  34. )
  35. ok
  36. 1