summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2014-12-23 12:04:46 -0500
committerJulien Gilli <julien.gilli@joyent.com>2015-01-13 14:54:44 -0800
commit0a430b9aecf6a82fba5d76a41dba9b5279e8ce89 (patch)
treebeea5f29592a942cf587c647aa31f8a16d1bdd9f
parent31051e5c7b253b6a0006b536188fc0494bd6e082 (diff)
downloadnode-0a430b9aecf6a82fba5d76a41dba9b5279e8ce89.tar.gz
test: backport use executable in spawn() test
Backport 10703774f01a4005fc74d6b4131c713259e81657 from the v0.12 branch. Currently, the test-child-process-spawn-typeerror.js is calling execFile() on a JavaScript source file, which is causing failures on Windows. This commit switches to calling spawn() on an actual executable. Fixes #8930. Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
-rw-r--r--test/simple/test-child-process-spawn-typeerror.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/simple/test-child-process-spawn-typeerror.js b/test/simple/test-child-process-spawn-typeerror.js
index 5c2f8ec63..d0adacc7f 100644
--- a/test/simple/test-child-process-spawn-typeerror.js
+++ b/test/simple/test-child-process-spawn-typeerror.js
@@ -41,10 +41,10 @@ assert.doesNotThrow(function() { spawn(cmd, a, o); });
assert.doesNotThrow(function() { spawn(cmd, o); });
// Variants of undefined as explicit 'no argument' at a position
-assert.doesNotThrow(function() { execFile(empty, u, o); });
-assert.doesNotThrow(function() { execFile(empty, a, u); });
-assert.doesNotThrow(function() { execFile(empty, n, o); });
-assert.doesNotThrow(function() { execFile(empty, a, n); });
+assert.doesNotThrow(function() { spawn(cmd, u, o); });
+assert.doesNotThrow(function() { spawn(cmd, a, u); });
+assert.doesNotThrow(function() { spawn(cmd, n, o); });
+assert.doesNotThrow(function() { spawn(cmd, a, n); });
assert.throws(function() { spawn(cmd, s); }, TypeError);
assert.doesNotThrow(function() { spawn(cmd, a, s); }, TypeError);