Skip to content

Commit

Permalink
fix pummel/test-child-process-spawn-loop.js on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Zinkovsky committed Oct 29, 2011
1 parent 60efa60 commit 6d7aa65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/pummel/test-child-process-spawn-loop.js
Expand Up @@ -27,6 +27,8 @@ var assert = require('assert');

var spawn = require('child_process').spawn;

var is_windows = process.platform === 'win32';

var SIZE = 1000 * 1024;
var N = 40;
var finished = false;
Expand All @@ -45,7 +47,8 @@ function doSpawn(i) {
});

child.on('exit', function() {
assert.equal(SIZE + 1, count); // + 1 for \n
// + 1 for \n or + 2 for \r\n on Windows
assert.equal(SIZE + (is_windows ? 2 : 1), count);
if (i < N) {
doSpawn(i + 1);
} else {
Expand Down

0 comments on commit 6d7aa65

Please sign in to comment.