Skip to content
This repository has been archived by the owner on Aug 31, 2018. It is now read-only.

Commit

Permalink
test: escape script filename on Windows
Browse files Browse the repository at this point in the history
Escape backslashes in script filename on Windows in a CLI test.

PR-URL: nodejs/node#16124
Fixes: nodejs/node#16057 and #16023
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
bzoz authored and addaleax committed Oct 15, 2017
1 parent 1fb747a commit b854a72
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/parallel/test-cli-eval.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ child.exec(`${nodejs} --use-strict -p process.execArgv`,

// Regression test for https://github.com/nodejs/node/issues/3574.
{
const emptyFile = fixtures.path('empty.js');
let emptyFile = fixtures.path('empty.js');
if (common.isWindows) {
emptyFile = emptyFile.replace(/\\/g, '\\\\');
}

child.exec(`${nodejs} -e 'require("child_process").fork("${emptyFile}")'`,
common.mustCall((err, stdout, stderr) => {
Expand Down

0 comments on commit b854a72

Please sign in to comment.