Skip to content

Commit

Permalink
test: add known_issues test for GH-2148
Browse files Browse the repository at this point in the history
PR-URL: #5920
Refs: #2148
Reviewed-By: Brian White <[email protected]>
  • Loading branch information
Trott authored and evanlucas committed Mar 31, 2016
1 parent 6113f6a commit c5c7ae8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/known_issues/test-stdout-buffer-flush-on-exit.js
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit c5c7ae8

Please sign in to comment.