Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: include file mode in assert message #16815

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions test/parallel/test-repl-history-perm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'use strict';

// Verifies that the REPL history file is created with mode 0600

// Flags: --expose_internals

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

r.input.end();
const stat = fs.statSync(replHistoryPath);
const fileMode = stat.mode & 0o777;
assert.strictEqual(
stat.mode & 0o777, 0o600,
'REPL history file should be mode 0600');
fileMode, 0o600,
`REPL history file should be mode 0600 but was 0${fileMode.toString(8)}`);
});

repl.createInternalRepl(
Expand Down