diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-05-10 07:53:18 +0300 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-05-12 11:35:09 +0300 |
commit | 529e4f206aa16e53e19a6f03b3bfc5f07268149e (patch) | |
tree | f8067873ab727709083b5ae394e9395ad844a119 /test/parallel/test-spawn-cmd-named-pipe.js | |
parent | 15410797f246acb9e2605e78b97b2757db30c5c3 (diff) | |
download | android-node-v8-529e4f206aa16e53e19a6f03b3bfc5f07268149e.tar.gz android-node-v8-529e4f206aa16e53e19a6f03b3bfc5f07268149e.tar.bz2 android-node-v8-529e4f206aa16e53e19a6f03b3bfc5f07268149e.zip |
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>
Diffstat (limited to 'test/parallel/test-spawn-cmd-named-pipe.js')
-rw-r--r-- | test/parallel/test-spawn-cmd-named-pipe.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/test/parallel/test-spawn-cmd-named-pipe.js b/test/parallel/test-spawn-cmd-named-pipe.js index 3843ba1f77..94a34b640d 100644 --- a/test/parallel/test-spawn-cmd-named-pipe.js +++ b/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(); |