diff --git a/test/test-process-kill.js b/test/test-process-kill.js new file mode 100644 index 0000000000..72e7e10907 --- /dev/null +++ b/test/test-process-kill.js @@ -0,0 +1,15 @@ +include("mjsunit.js"); + +var cat = new node.Process("cat"); + +var exit_status = -1; + +cat.onOutput = function (chunk) { assertEquals(null, chunk); }; +cat.onError = function (chunk) { assertEquals(null, chunk); }; +cat.onExit = function (status) { exit_status = status; }; + +cat.kill(); + +function onExit () { + assertTrue(exit_status > 0); +}