Skip to content

Commit 4254bf8

Browse files
committed
Make test output more reliable
1 parent 8b20e7b commit 4254bf8

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

ext/standard/tests/file/realpath_bug77484.phpt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,23 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
99
--FILE--
1010
<?php
1111

12-
var_dump(\getcwd());
12+
$old_cwd = getcwd();
1313

14-
\mkdir(__DIR__ . "/foo");
15-
\chdir(__DIR__ . "/foo");
16-
\rmdir(__DIR__ . "/foo");
14+
mkdir(__DIR__ . "/foo");
15+
chdir(__DIR__ . "/foo");
16+
rmdir(__DIR__ . "/foo");
1717

1818
// Outputs: / (incorrect)
19-
var_dump(\getcwd());
19+
$new_cwd = getcwd();
2020

2121
// Outputs: false (correct)
22-
var_dump(\realpath(''));
22+
$rp0 = realpath('');
2323

2424
// Crash
25-
var_dump(\realpath('.'), \realpath('./'));
25+
$rp1 = realpath('.');
26+
$rp2 = realpath('./');
2627

28+
var_dump($old_cwd, $new_cwd, $rp0, $rp1, $rp2);
2729
?>
2830
--EXPECTF--
2931
string(%d) "%s"

0 commit comments

Comments
 (0)