2009-06-21 20:06:03 +08:00
|
|
|
include("mjsunit.js");
|
|
|
|
|
|
|
|
var exit_status = -1;
|
|
|
|
|
2009-06-24 19:58:17 +08:00
|
|
|
function onLoad () {
|
2009-06-30 19:40:00 +08:00
|
|
|
var cat = node.createProcess("cat");
|
2009-06-24 19:58:17 +08:00
|
|
|
|
2009-06-29 19:18:30 +08:00
|
|
|
cat.addListener("output", function (chunk) { assertEquals(null, chunk); });
|
|
|
|
cat.addListener("error", function (chunk) { assertEquals(null, chunk); });
|
|
|
|
cat.addListener("exit", function (status) { exit_status = status; });
|
2009-06-21 20:06:03 +08:00
|
|
|
|
2009-06-24 19:58:17 +08:00
|
|
|
cat.kill();
|
|
|
|
}
|
2009-06-21 20:06:03 +08:00
|
|
|
|
|
|
|
function onExit () {
|
|
|
|
assertTrue(exit_status > 0);
|
|
|
|
}
|