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>
This commit is contained in:
parent
21d66d621c
commit
33c27f8fcf
20
test/known_issues/test-stdout-buffer-flush-on-exit.js
Normal file
20
test/known_issues/test-stdout-buffer-flush-on-exit.js
Normal file
@ -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);
|
Loading…
x
Reference in New Issue
Block a user