diff --git a/test/parallel/test-fs-readfile-pipe-large.js b/test/parallel/test-fs-readfile-pipe-large.js index 66f955a5614378..99e4bfada8a55e 100644 --- a/test/parallel/test-fs-readfile-pipe-large.js +++ b/test/parallel/test-fs-readfile-pipe-large.js @@ -12,11 +12,6 @@ if (process.platform === 'win32') { var fs = require('fs'); -var filename = path.join(common.tmpDir, '/readfile_pipe_large_test.txt'); -var dataExpected = new Array(1000000).join('a'); -common.refreshTmpDir(); -fs.writeFileSync(filename, dataExpected); - if (process.argv[2] === 'child') { fs.readFile('/dev/stdin', function(er, data) { if (er) throw er; @@ -25,6 +20,11 @@ if (process.argv[2] === 'child') { return; } +var filename = path.join(common.tmpDir, '/readfile_pipe_large_test.txt'); +var dataExpected = new Array(1000000).join('a'); +common.refreshTmpDir(); +fs.writeFileSync(filename, dataExpected); + var exec = require('child_process').exec; var f = JSON.stringify(__filename); var node = JSON.stringify(process.execPath); diff --git a/test/parallel/test-fs-readfilesync-pipe-large.js b/test/parallel/test-fs-readfilesync-pipe-large.js index e9045b27f1789d..9b0b6b4299ec56 100644 --- a/test/parallel/test-fs-readfilesync-pipe-large.js +++ b/test/parallel/test-fs-readfilesync-pipe-large.js @@ -12,16 +12,16 @@ if (process.platform === 'win32') { var fs = require('fs'); -var filename = path.join(common.tmpDir, '/readfilesync_pipe_large_test.txt'); -var dataExpected = new Array(1000000).join('a'); -common.refreshTmpDir(); -fs.writeFileSync(filename, dataExpected); - if (process.argv[2] === 'child') { process.stdout.write(fs.readFileSync('/dev/stdin', 'utf8')); return; } +var filename = path.join(common.tmpDir, '/readfilesync_pipe_large_test.txt'); +var dataExpected = new Array(1000000).join('a'); +common.refreshTmpDir(); +fs.writeFileSync(filename, dataExpected); + var exec = require('child_process').exec; var f = JSON.stringify(__filename); var node = JSON.stringify(process.execPath);