Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2011-08-05 12:03:38 +0400
committerBert Belder <bertbelder@gmail.com>2011-08-06 00:57:45 +0400
commit9e8d812ce998bf3ef2857c311730163b8fa45fef (patch)
tree45e3e912717d1ca583d1bd2b2d6f4769ff8ec85d /test
parent567470b136c2b170b327e26f15a0e59de7dec250 (diff)
Make test-child-process-exec-env work on windows
Diffstat (limited to 'test')
-rw-r--r--test/simple/test-child-process-exec-env.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/simple/test-child-process-exec-env.js b/test/simple/test-child-process-exec-env.js
index 8ab8de4f462..68fca60f02b 100644
--- a/test/simple/test-child-process-exec-env.js
+++ b/test/simple/test-child-process-exec-env.js
@@ -25,6 +25,7 @@ var exec = require('child_process').exec;
var success_count = 0;
var error_count = 0;
var response = '';
+var child;
function after(err, stdout, stderr) {
if (err) {
@@ -39,7 +40,11 @@ function after(err, stdout, stderr) {
}
}
-var child = exec('/usr/bin/env', { env: { 'HELLO': 'WORLD' } }, after);
+if (process.platform !== 'win32') {
+ child = exec('/usr/bin/env', { env: { 'HELLO': 'WORLD' } }, after);
+} else {
+ child = exec('set', { env: { 'HELLO': 'WORLD' } }, after);
+}
child.stdout.setEncoding('utf8');
child.stdout.addListener('data', function(chunk) {