diff options
author | Trevor Norris <trev.norris@gmail.com> | 2013-11-01 13:57:09 -0700 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2013-11-01 16:36:23 -0700 |
commit | d2a600200ee0a4befd49176e8fc981a28bf611c6 (patch) | |
tree | e7bb87d6ebd2fe1d279dc0d65aa120414d2ef723 /test | |
parent | df3537102b9ba335f05315e513e7cb0123321362 (diff) | |
download | nodejs-d2a600200ee0a4befd49176e8fc981a28bf611c6.tar.gz nodejs-d2a600200ee0a4befd49176e8fc981a28bf611c6.tar.bz2 nodejs-d2a600200ee0a4befd49176e8fc981a28bf611c6.zip |
test: fix async listener test for windows
Diffstat (limited to 'test')
-rw-r--r-- | test/simple/test-asynclistener-error-throw-in-error.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/simple/test-asynclistener-error-throw-in-error.js b/test/simple/test-asynclistener-error-throw-in-error.js index 271dd0383..95c9fff03 100644 --- a/test/simple/test-asynclistener-error-throw-in-error.js +++ b/test/simple/test-asynclistener-error-throw-in-error.js @@ -23,7 +23,7 @@ var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; -var checkStr = 'WRITTEN ON EXIT\n'; +var checkStr = 'WRITTEN ON EXIT'; if (process.argv[2] === 'child') runChild(); @@ -76,10 +76,10 @@ function runParent() { process.on('exit', function() { process._rawDebug('child ondata message:', - childStr.substr(0, childStr.indexOf('\n'))); + childStr.substr(0, checkStr.length)); assert.ok(childDidExit); - assert.notEqual(childStr.indexOf(checkStr), -1); + assert.equal(childStr.substr(0, checkStr.length), checkStr); console.log('ok'); }); } |