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

Commit b854a72

Browse files
bzozaddaleax
authored andcommitted
test: escape script filename on Windows
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]>
1 parent 1fb747a commit b854a72

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/parallel/test-cli-eval.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ child.exec(`${nodejs} --use-strict -p process.execArgv`,
139139

140140
// Regression test for https://github.com/nodejs/node/issues/3574.
141141
{
142-
const emptyFile = fixtures.path('empty.js');
142+
let emptyFile = fixtures.path('empty.js');
143+
if (common.isWindows) {
144+
emptyFile = emptyFile.replace(/\\/g, '\\\\');
145+
}
143146

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

0 commit comments

Comments
 (0)