From 145072e73629b8b9b131b8a1117bb9d44a0fb155 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 21 Jun 2009 14:06:03 +0200 Subject: [PATCH] Add test-process-kill.js --- test/test-process-kill.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/test-process-kill.js 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); +}