From 6d7aa65399ea302adb3965c57938ae8393f8dbb3 Mon Sep 17 00:00:00 2001 From: Igor Zinkovsky Date: Fri, 28 Oct 2011 18:30:03 -0700 Subject: [PATCH] fix pummel/test-child-process-spawn-loop.js on windows --- test/pummel/test-child-process-spawn-loop.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/pummel/test-child-process-spawn-loop.js b/test/pummel/test-child-process-spawn-loop.js index 0e0375460a..327849b6ef 100644 --- a/test/pummel/test-child-process-spawn-loop.js +++ b/test/pummel/test-child-process-spawn-loop.js @@ -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; @@ -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 {