Skip to content

Commit 9d8d7c6

Browse files
cjihrigtargos
authored andcommitted
test: do not OR F_OK in fs.access() test
access() does not support OR'ing F_OK with other constants. This commit updates test-fs-access.js to not test that scenario. PR-URL: #41484 Refs: libuv/libuv#3410 Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca Reviewed-By: Tobias Nießen
1 parent af3acec commit 9d8d7c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/parallel/test-fs-access.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ fs.access(__filename, fs.R_OK, common.mustCall(function(...args) {
8282
fs.promises.access(__filename, fs.R_OK)
8383
.then(common.mustCall())
8484
.catch(throwNextTick);
85-
fs.access(readOnlyFile, fs.F_OK | fs.R_OK, common.mustCall(function(...args) {
85+
fs.access(readOnlyFile, fs.R_OK, common.mustCall(function(...args) {
8686
assert.deepStrictEqual(args, [null]);
8787
}));
88-
fs.promises.access(readOnlyFile, fs.F_OK | fs.R_OK)
88+
fs.promises.access(readOnlyFile, fs.R_OK)
8989
.then(common.mustCall())
9090
.catch(throwNextTick);
9191

@@ -153,7 +153,7 @@ assert.throws(
153153

154154
// Regular access should not throw.
155155
fs.accessSync(__filename);
156-
const mode = fs.F_OK | fs.R_OK | fs.W_OK;
156+
const mode = fs.R_OK | fs.W_OK;
157157
fs.accessSync(readWriteFile, mode);
158158

159159
// Invalid modes should throw.

0 commit comments

Comments
 (0)