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 804cc76

Browse filesBrowse files
XeCyclebnoordhuis
authored andcommitted
test: numeric flags to fs.open
This has been supperted for long but never tested nor documented. PR-URL: #3641 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 3f4409e commit 804cc76
Copy full SHA for 804cc76

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+16
-0
lines changed
Open diff view settings
Collapse file
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'use strict';
2+
const common = require('../common');
3+
4+
const constants = require('constants');
5+
const assert = require('assert');
6+
const fs = require('fs');
7+
const path = require('path');
8+
9+
common.refreshTmpDir();
10+
11+
// O_WRONLY without O_CREAT shall fail with ENOENT
12+
const pathNE = path.join(common.tmpDir, 'file-should-not-exist');
13+
assert.throws(
14+
() => fs.openSync(pathNE, constants.O_WRONLY),
15+
(e) => e.code === 'ENOENT'
16+
);

0 commit comments

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