You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
483 B

process.mixin(require("./common"));
var sub = path.join(fixturesDir, 'echo.js');
var result = false;
var child = process.createChildProcess(path.join(libDir, "../bin/node"), [sub]);
child.addListener("error", function (data){
puts("parent stderr: " + data);
});
child.addListener("output", function (data){
if (data && data[0] == 't') {
result = true;
}
});
setTimeout(function () {
child.write('t\r\n');
}, 100);
setTimeout(function (){
assert.ok(result);
}, 500)