summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNathan Rajlich <nathan@tootallnate.net>2011-02-18 13:44:20 -0800
committerRyan Dahl <ry@tinyclouds.org>2011-02-24 16:36:23 -0800
commita9a252fda9054a90cd0be17ea1ea492c82c317c2 (patch)
tree1eab59cad8b8be5669ed6d99781852b0eba17a48 /test
parent8a50f23fd3fed1b17f0fd06fc1966e4c188c4543 (diff)
downloadnodejs-a9a252fda9054a90cd0be17ea1ea492c82c317c2.tar.gz
nodejs-a9a252fda9054a90cd0be17ea1ea492c82c317c2.tar.bz2
nodejs-a9a252fda9054a90cd0be17ea1ea492c82c317c2.zip
Read up the prototype of the 'env' object.
Closes GH-713.
Diffstat (limited to 'test')
-rw-r--r--test/simple/test-child-process-env.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/simple/test-child-process-env.js b/test/simple/test-child-process-env.js
index e28a6059d..1f5ffef4d 100644
--- a/test/simple/test-child-process-env.js
+++ b/test/simple/test-child-process-env.js
@@ -2,7 +2,15 @@ var common = require('../common');
var assert = require('assert');
var spawn = require('child_process').spawn;
-var child = spawn('/usr/bin/env', [], {env: {'HELLO': 'WORLD'}});
+
+var env = {
+ 'HELLO': 'WORLD'
+};
+env.__proto__ = {
+ 'FOO': 'BAR'
+}
+
+var child = spawn('/usr/bin/env', [], {env: env});
var response = '';
@@ -15,4 +23,5 @@ child.stdout.addListener('data', function(chunk) {
process.addListener('exit', function() {
assert.ok(response.indexOf('HELLO=WORLD') >= 0);
+ assert.ok(response.indexOf('FOO=BAR') >= 0);
});