Skip to content

Commit 2ea77e5

Browse files
committed
posix_access_flags
1 parent b545077 commit 2ea77e5

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

ext/posix/tests/posix_access_flags.phpt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,28 @@ $testfile = "$dir/testfile.txt";
1515
// Create a temporary file for valid access tests
1616
file_put_contents($testfile, "hello");
1717

18-
// Invalid: negative mode
1918
try {
2019
posix_access($testfile, -1);
2120
} catch (ValueError $e) {
2221
echo $e->getMessage(), "\n";
2322
}
2423

25-
// Invalid: mode with garbage bits
2624
try {
2725
posix_access($testfile, 01000); // S_ISVTX bit (sticky)
2826
} catch (ValueError $e) {
2927
echo $e->getMessage(), "\n";
3028
}
3129

32-
// Invalid: mode with unrelated high bits
3330
try {
3431
posix_access($testfile, 02000); // S_ISGID bit
3532
} catch (ValueError $e) {
3633
echo $e->getMessage(), "\n";
3734
}
3835

39-
// Valid: check read and write access
4036
if (posix_access($testfile, POSIX_R_OK | POSIX_W_OK)) {
4137
echo "Read/write access OK\n";
4238
}
4339

44-
// Valid: check file existence
4540
if (posix_access($testfile, POSIX_F_OK)) {
4641
echo "File exists OK\n";
4742
}

0 commit comments

Comments
 (0)