mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
18 lines
377 B
JavaScript
18 lines
377 B
JavaScript
require("../common");
|
|
|
|
var spawn = require('child_process').spawn;
|
|
child = spawn('/usr/bin/env', [], {'HELLO' : 'WORLD'});
|
|
|
|
response = "";
|
|
|
|
child.stdout.setEncoding('utf8');
|
|
|
|
child.stdout.addListener("data", function (chunk) {
|
|
puts("stdout: " + chunk);
|
|
response += chunk;
|
|
});
|
|
|
|
process.addListener('exit', function () {
|
|
assert.ok(response.indexOf('HELLO=WORLD') >= 0);
|
|
});
|