diff options
Diffstat (limited to 'test/parallel/test-child-process-exec-maxBuffer.js')
-rw-r--r-- | test/parallel/test-child-process-exec-maxBuffer.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/parallel/test-child-process-exec-maxBuffer.js b/test/parallel/test-child-process-exec-maxBuffer.js index 714e029d72..65674a8503 100644 --- a/test/parallel/test-child-process-exec-maxBuffer.js +++ b/test/parallel/test-child-process-exec-maxBuffer.js @@ -11,6 +11,17 @@ function checkFactory(streamName) { } { + const cmd = `"${process.execPath}" -e "console.log('hello world');"`; + const options = { maxBuffer: Infinity }; + + cp.exec(cmd, options, common.mustCall((err, stdout, stderr) => { + assert.ifError(err); + assert.strictEqual(stdout.trim(), 'hello world'); + assert.strictEqual(stderr, ''); + })); +} + +{ const cmd = 'echo "hello world"'; cp.exec(cmd, { maxBuffer: 5 }, checkFactory('stdout')); |