diff options
author | Rich Trott <rtrott@gmail.com> | 2016-03-26 19:33:48 -0700 |
---|---|---|
committer | Myles Borins <mborins@us.ibm.com> | 2016-04-11 11:32:59 -0400 |
commit | fe0233b923d0a8f69845f90b1b0884b55a8d582c (patch) | |
tree | d27b758fb12736a3a3aa7483b238fb0bc399128e | |
parent | 9a8f922dee99b60767f4593c4d42855009052875 (diff) | |
download | nodejs-fe0233b923d0a8f69845f90b1b0884b55a8d582c.tar.gz nodejs-fe0233b923d0a8f69845f90b1b0884b55a8d582c.tar.bz2 nodejs-fe0233b923d0a8f69845f90b1b0884b55a8d582c.zip |
test: add known_issues test for GH-2148
PR-URL: https://github.com/nodejs/node/pull/5920
Refs: https://github.com/nodejs/node/issues/2148
Reviewed-By: Brian White <mscdex@mscdex.net>
-rw-r--r-- | test/known_issues/test-stdout-buffer-flush-on-exit.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/known_issues/test-stdout-buffer-flush-on-exit.js b/test/known_issues/test-stdout-buffer-flush-on-exit.js new file mode 100644 index 000000000..f4ea0b5e0 --- /dev/null +++ b/test/known_issues/test-stdout-buffer-flush-on-exit.js @@ -0,0 +1,20 @@ +'use strict'; +// Refs: https://github.com/nodejs/node/issues/2148 + +require('../common'); +const assert = require('assert'); +const execSync = require('child_process').execSync; + +const longLine = 'foo bar baz quux quuz aaa bbb ccc'.repeat(65536); + +if (process.argv[2] === 'child') { + process.on('exit', () => { + console.log(longLine); + }); + process.exit(); +} + +const cmd = `${process.execPath} ${__filename} child`; +const stdout = execSync(cmd).toString().trim(); + +assert.strictEqual(stdout, longLine); |