diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2011-10-15 01:08:36 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2011-10-15 01:08:36 +0200 |
commit | 018e110cd11720997e49c9b270ecc50a04de4ece (patch) | |
tree | 7573cccca0be5399b964e015faaf94055dfeef37 /test/pummel/test-child-process-spawn-loop.js | |
parent | 3108a9ee3831b8b0a40a09314a005ef2430dacbc (diff) | |
download | android-node-v8-018e110cd11720997e49c9b270ecc50a04de4ece.tar.gz android-node-v8-018e110cd11720997e49c9b270ecc50a04de4ece.tar.bz2 android-node-v8-018e110cd11720997e49c9b270ecc50a04de4ece.zip |
test: replace .addListener() calls with .on()
Diffstat (limited to 'test/pummel/test-child-process-spawn-loop.js')
-rw-r--r-- | test/pummel/test-child-process-spawn-loop.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/pummel/test-child-process-spawn-loop.js b/test/pummel/test-child-process-spawn-loop.js index 121cddb01d..0e0375460a 100644 --- a/test/pummel/test-child-process-spawn-loop.js +++ b/test/pummel/test-child-process-spawn-loop.js @@ -36,15 +36,15 @@ function doSpawn(i) { var count = 0; child.stdout.setEncoding('ascii'); - child.stdout.addListener('data', function(chunk) { + child.stdout.on('data', function(chunk) { count += chunk.length; }); - child.stderr.addListener('data', function(chunk) { + child.stderr.on('data', function(chunk) { console.log('stderr: ' + chunk); }); - child.addListener('exit', function() { + child.on('exit', function() { assert.equal(SIZE + 1, count); // + 1 for \n if (i < N) { doSpawn(i + 1); @@ -56,6 +56,6 @@ function doSpawn(i) { doSpawn(0); -process.addListener('exit', function() { +process.on('exit', function() { assert.ok(finished); }); |