Skip to content

Commit 10ae8b6

Browse files
Mizunashi Mananikic
Mizunashi Mana
authored andcommitted
Fix opcache blacklist test on macOS
1 parent 82e0fb6 commit 10ae8b6

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

ext/opcache/tests/blacklist.phpt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@ opcache.file_update_protection=0
88
opcache.file_cache_only=0
99
--SKIPIF--
1010
<?php require_once('skipif.inc'); ?>
11-
<?php if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip not for Windows'); } ?>
11+
<?php
12+
if (substr(PHP_OS, 0, 3) == 'WIN') {
13+
die('skip not for Windows');
14+
}
15+
/* On macOS, `/tmp` is an alias to `/private/tmp` .
16+
* So, we should write `%S/tmp/path` as `/tmp/path`, except for Windows.
17+
*/
18+
?>
1219
--FILE--
1320
<?php
1421
$conf = opcache_get_configuration();
@@ -20,16 +27,16 @@ include("blacklist.inc");
2027
$status = opcache_get_status();
2128
print_r(count($status['scripts']));
2229
?>
23-
--EXPECT--
30+
--EXPECTF--
2431
Array
2532
(
2633
[0] => /path/to/foo
2734
[1] => /path/to/foo2
2835
[2] => /path/to/bar
2936
[3] => __DIR__/blacklist.inc
3037
[4] => __DIR__/current.php
31-
[5] => /tmp/path/?nocache.inc
32-
[6] => /tmp/path/*/somedir
38+
[5] => %S/tmp/path/?nocache.inc
39+
[6] => %S/tmp/path/*/somedir
3340
)
3441
ok
3542
1

0 commit comments

Comments
 (0)