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:
authorIgor Zinkovsky <igorzi@microsoft.com>2011-08-02 00:43:38 +0400
committerRyan Dahl <ry@tinyclouds.org>2011-08-02 01:49:10 +0400
commit925b467a4e6f76bee6252d5bc7b90ca579c77bf3 (patch)
treee71641830d876084827895d74cf0f9fdccac66ce /test
parent1710bea3554db6506c698c651e639743f3f22e2e (diff)
fix test-child-process-env on windows
Diffstat (limited to 'test')
-rw-r--r--test/simple/test-child-process-env.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/simple/test-child-process-env.js b/test/simple/test-child-process-env.js
index b8d3a92ae73..7e61b2e6af3 100644
--- a/test/simple/test-child-process-env.js
+++ b/test/simple/test-child-process-env.js
@@ -24,6 +24,8 @@ var assert = require('assert');
var spawn = require('child_process').spawn;
+var isWindows = process.platform === 'win32';
+
var env = {
'HELLO': 'WORLD'
};
@@ -31,7 +33,12 @@ env.__proto__ = {
'FOO': 'BAR'
}
-var child = spawn('/usr/bin/env', [], {env: env});
+if (isWindows) {
+ var child = spawn('cmd.exe', ['/c set'], {env: env});
+} else {
+ var child = spawn('/usr/bin/env', [], {env: env});
+}
+
var response = '';