FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix pummel/test-child-process-spawn-loop.js on windows · wave2future/node@6d7aa65 · GitHub

Repository navigation

Commit 6d7aa65

Browse files
Igor Zinkovsky
committed
fix pummel/test-child-process-spawn-loop.js on windows
1 parent 60efa60 commit 6d7aa65

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎test/pummel/test-child-process-spawn-loop.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ var assert = require('assert');
2727

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

30+
var is_windows = process.platform === 'win32';
31+
3032
var SIZE = 1000 * 1024;
3133
var N = 40;
3234
var finished = false;
@@ -45,7 +47,8 @@ function doSpawn(i) {
4547
});
4648

4749
child.on('exit', function() {
48-
assert.equal(SIZE + 1, count); // + 1 for \n
50+
// + 1 for \n or + 2 for \r\n on Windows
51+
assert.equal(SIZE + (is_windows ? 2 : 1), count);
4952
if (i < N) {
5053
doSpawn(i + 1);
5154
} else {

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL