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 3cd9833

Browse filesBrowse files
hiroppyItalo A. Casas
authored andcommitted
test: add tests for rs+, sr+ to test-fs-open-flags.js
PR-URL: #10780 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent c8a069e commit 3cd9833
Copy full SHA for 3cd9833

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/parallel/test-fs-open-flags.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-open-flags.js
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ const O_CREAT = fs.constants.O_CREAT || 0;
1010
const O_EXCL = fs.constants.O_EXCL || 0;
1111
const O_RDONLY = fs.constants.O_RDONLY || 0;
1212
const O_RDWR = fs.constants.O_RDWR || 0;
13+
const O_SYNC = fs.constants.O_SYNC || 0;
1314
const O_TRUNC = fs.constants.O_TRUNC || 0;
1415
const O_WRONLY = fs.constants.O_WRONLY || 0;
1516

1617
const { stringToFlags } = require('internal/fs');
1718

1819
assert.strictEqual(stringToFlags('r'), O_RDONLY);
1920
assert.strictEqual(stringToFlags('r+'), O_RDWR);
21+
assert.strictEqual(stringToFlags('rs+'), O_RDWR | O_SYNC);
22+
assert.strictEqual(stringToFlags('sr+'), O_RDWR | O_SYNC);
2023
assert.strictEqual(stringToFlags('w'), O_TRUNC | O_CREAT | O_WRONLY);
2124
assert.strictEqual(stringToFlags('w+'), O_TRUNC | O_CREAT | O_RDWR);
2225
assert.strictEqual(stringToFlags('a'), O_APPEND | O_CREAT | O_WRONLY);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.