Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9d8d7c6

Browse filesBrowse 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
Copy full SHA for 9d8d7c6

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-fs-access.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-access.js
+3-3Lines changed: 3 additions & 3 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.