summaryrefslogtreecommitdiff
path: root/test/sequential/test-child-process-execsync.js
diff options
context:
space:
mode:
authorShigeki Ohtsu <ohtsu@iij.ad.jp>2015-03-12 10:16:26 +0900
committerBert Belder <bertbelder@gmail.com>2015-03-12 17:35:20 -0700
commit82f067e60bb3eb87cc1119655ae0a5968e988326 (patch)
tree2b3ecfedd0185162b6e3ac77ee93a55054c2cf8a /test/sequential/test-child-process-execsync.js
parent5ecdc0314d87354166b282501435b2f6fd2248ab (diff)
downloadandroid-node-v8-82f067e60bb3eb87cc1119655ae0a5968e988326.tar.gz
android-node-v8-82f067e60bb3eb87cc1119655ae0a5968e988326.tar.bz2
android-node-v8-82f067e60bb3eb87cc1119655ae0a5968e988326.zip
test: fix ext commands to be double quoted
Paths used on the Windows command line need to be enclosed in double quotes, or they'll be parsed incorrectly when there are spaces in the path. PR-URL: https://github.com/iojs/io.js/pull/1122 Reviewed-by: Bert Belder <bertbelder@gmail.com>
Diffstat (limited to 'test/sequential/test-child-process-execsync.js')
-rw-r--r--test/sequential/test-child-process-execsync.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/sequential/test-child-process-execsync.js b/test/sequential/test-child-process-execsync.js
index 91105e4620..5cd9ee433d 100644
--- a/test/sequential/test-child-process-execsync.js
+++ b/test/sequential/test-child-process-execsync.js
@@ -14,7 +14,7 @@ var err;
var caught = false;
try
{
- var cmd = util.format('%s -e "setTimeout(function(){}, %d);"',
+ var cmd = util.format('"%s" -e "setTimeout(function(){}, %d);"',
process.execPath, SLEEP);
var ret = execSync(cmd, {timeout: TIMER});
} catch (e) {
@@ -37,7 +37,7 @@ var msg = 'foobar';
var msgBuf = new Buffer(msg + '\n');
// console.log ends every line with just '\n', even on Windows.
-cmd = util.format('%s -e "console.log(\'%s\');"', process.execPath, msg);
+cmd = util.format('"%s" -e "console.log(\'%s\');"', process.execPath, msg);
var ret = execSync(cmd);