summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/opcache/tests/blacklist.phpt15
1 files changed, 11 insertions, 4 deletions
diff --git a/ext/opcache/tests/blacklist.phpt b/ext/opcache/tests/blacklist.phpt
index da3ef47c99..873683605a 100644
--- a/ext/opcache/tests/blacklist.phpt
+++ b/ext/opcache/tests/blacklist.phpt
@@ -8,7 +8,14 @@ opcache.file_update_protection=0
opcache.file_cache_only=0
--SKIPIF--
<?php require_once('skipif.inc'); ?>
-<?php if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip not for Windows'); } ?>
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip not for Windows');
+}
+/* On macOS, `/tmp` is an alias to `/private/tmp` .
+ * So, we should write `%S/tmp/path` as `/tmp/path`, except for Windows.
+ */
+?>
--FILE--
<?php
$conf = opcache_get_configuration();
@@ -20,7 +27,7 @@ include("blacklist.inc");
$status = opcache_get_status();
print_r(count($status['scripts']));
?>
---EXPECT--
+--EXPECTF--
Array
(
[0] => /path/to/foo
@@ -28,8 +35,8 @@ Array
[2] => /path/to/bar
[3] => __DIR__/blacklist.inc
[4] => __DIR__/current.php
- [5] => /tmp/path/?nocache.inc
- [6] => /tmp/path/*/somedir
+ [5] => %S/tmp/path/?nocache.inc
+ [6] => %S/tmp/path/*/somedir
)
ok
1