Skip to content

Commit d6d59a9

Browse files
author
Sascha Schumann
committed
1. st_blksize might be different for regular files and symlinks; hence
ignore differences in the twelfth element of the stat() array. 2. The 'test.file' is created by the script, thus the owner of the file is the user id executing the script. A mode of 0654 does not grant the owner the right to execute the file and therefore, the correct output here is "not executable."
1 parent 167dcb0 commit d6d59a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/standard/tests/file/001.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ $s = stat ('test.link');
5151
$ls = lstat ('test.link');
5252
for ($i = 0; $i <= 11; $i++) {
5353
if ($ls[$i] != $s[$i]) {
54-
if($i!=6) echo "test.link lstat and stat differ at element $i\n";
54+
if ($i != 6 && $i != 11) echo "test.link lstat and stat differ at element $i\n";
5555
}
5656
}
5757
echo "test.file is " . filetype('test.file') . "\n";
@@ -138,7 +138,7 @@ test.file permissions are 0654
138138
test.file size is 0
139139
test.file is writeable
140140
test.file is readable
141-
test.file is executable
141+
test.file is not executable
142142
test.file is not executable
143143
test.file is a regular file
144144
test.link is a regular file

0 commit comments

Comments
 (0)