0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
nodejs/test/simple/test-child-process-env.js

13 lines
339 B
JavaScript

require("../common");
child = process.createChildProcess('/usr/bin/env', [], {'HELLO' : 'WORLD'});
response = "";
child.addListener("output", function (chunk) {
puts("stdout: " + JSON.stringify(chunk));
if (chunk) response += chunk;
});
process.addListener('exit', function () {
assert.ok(response.indexOf('HELLO=WORLD') >= 0);
});