Browse Source

test: make a test path-independent

parallel/test-spawn-cmd-named-pipe.js failed with spaces
both in node.exe and test paths.

PR-URL: https://github.com/nodejs/node/pull/12945
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
v6
Vse Mozhet Byt 8 years ago
parent
commit
529e4f206a
  1. 11
      test/parallel/test-spawn-cmd-named-pipe.js

11
test/parallel/test-spawn-cmd-named-pipe.js

@ -37,15 +37,10 @@ if (!process.argv[2]) {
});
stdoutPipeServer.listen(stdoutPipeName);
const comspec = process.env['comspec'];
if (!comspec || comspec.length === 0) {
assert.fail('Failed to get COMSPEC');
}
const args =
[`"${__filename}"`, 'child', '<', stdinPipeName, '>', stdoutPipeName];
const args = ['/c', process.execPath, __filename, 'child',
'<', stdinPipeName, '>', stdoutPipeName];
const child = spawn(comspec, args);
const child = spawn(`"${process.execPath}"`, args, { shell: true });
child.on('exit', common.mustCall(function(exitCode) {
stdinPipeServer.close();

Loading…
Cancel
Save