diff options
author | Igor Zinkovsky <igorzi@microsoft.com> | 2011-08-02 00:43:38 +0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-08-02 01:49:10 +0400 |
commit | 925b467a4e6f76bee6252d5bc7b90ca579c77bf3 (patch) | |
tree | e71641830d876084827895d74cf0f9fdccac66ce /test | |
parent | 1710bea3554db6506c698c651e639743f3f22e2e (diff) |
fix test-child-process-env on windows
Diffstat (limited to 'test')
-rw-r--r-- | test/simple/test-child-process-env.js | 9 |
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 = ''; |