mirror of https://github.com/lukechilds/node.git
Browse Source
http://groups.google.com/group/nodejs/browse_thread/thread/10fda8eaf7276642/e5d5147f2b666abdv0.7.4-release
Mikeal Rogers
15 years ago
committed by
Ryan Dahl
3 changed files with 38 additions and 3 deletions
@ -0,0 +1,5 @@ |
|||||
|
process.mixin(require("../common")); |
||||
|
process.stdio.open(); |
||||
|
process.stdio.addListener("data", function (data) { |
||||
|
puts(data); |
||||
|
}); |
@ -0,0 +1,21 @@ |
|||||
|
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) |
Loading…
Reference in new issue