node/test/mjsunit/test-process-kill.js

18 lines
405 B
JavaScript
Raw Normal View History

2009-06-21 20:06:03 +08:00
include("mjsunit.js");
var exit_status = -1;
function onLoad () {
var cat = new node.Process("cat");
2009-06-28 02:40:43 +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
cat.kill();
}
2009-06-21 20:06:03 +08:00
function onExit () {
assertTrue(exit_status > 0);
}