mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
13 lines
339 B
JavaScript
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);
|
|
});
|