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 2bbc76e

Browse filesBrowse files
sastanMylesBorins
authored andcommitted
test: include file mode in assert message
If the REPL history file is created with an invalid mode include the failed mode in the error message. PR-URL: #16815 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent f2a9c02 commit 2bbc76e
Copy full SHA for 2bbc76e

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+6
-2
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-repl-history-perm.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-repl-history-perm.js
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
'use strict';
2+
3+
// Verifies that the REPL history file is created with mode 0600
4+
25
// Flags: --expose_internals
36

47
const common = require('../common');
@@ -39,9 +42,10 @@ const checkResults = common.mustCall(function(err, r) {
3942

4043
r.input.end();
4144
const stat = fs.statSync(replHistoryPath);
45+
const fileMode = stat.mode & 0o777;
4246
assert.strictEqual(
43-
stat.mode & 0o777, 0o600,
44-
'REPL history file should be mode 0600');
47+
fileMode, 0o600,
48+
`REPL history file should be mode 0600 but was 0${fileMode.toString(8)}`);
4549
});
4650

4751
repl.createInternalRepl(

0 commit comments

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