Permalink
Browse files

test-process-kill: start process after onLoad

  • Loading branch information...
1 parent 7363ccd commit bdad5e7333b15a786cd999b411463ffba5e36592 @ry ry committed Jun 24, 2009
Showing with 8 additions and 6 deletions.
  1. +8 −6 test/mjsunit/test-process-kill.js
@@ -1,14 +1,16 @@
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; };
+function onLoad () {
+ var cat = new node.Process("cat");
+
+ cat.onOutput = function (chunk) { assertEquals(null, chunk); };
+ cat.onError = function (chunk) { assertEquals(null, chunk); };
+ cat.onExit = function (status) { exit_status = status; };
-cat.kill();
+ cat.kill();
+}
function onExit () {
assertTrue(exit_status > 0);

0 comments on commit bdad5e7

Please sign in to comment.