diff --git a/test/known_issues/known_issues.status b/test/known_issues/known_issues.status new file mode 100644 index 0000000000..12e4b10d06 --- /dev/null +++ b/test/known_issues/known_issues.status @@ -0,0 +1,20 @@ +prefix known_issues + +# If a known issue does not apply to a platform, list the test name in the +# appropriate section below, without ".js", followed by ": SKIP". Example: +# sample-test : SKIP + +[true] # This section applies to all platforms + +[$system==win32] +test-stdout-buffer-flush-on-exit: SKIP + +[$system==linux] + +[$system==macos] + +[$system==solaris] + +[$system==freebsd] + +[$system==aix] diff --git a/test/known_issues/test-stdout-buffer-flush-on-exit.js b/test/known_issues/test-stdout-buffer-flush-on-exit.js index f4ea0b5e01..be29081007 100644 --- a/test/known_issues/test-stdout-buffer-flush-on-exit.js +++ b/test/known_issues/test-stdout-buffer-flush-on-exit.js @@ -5,16 +5,23 @@ require('../common'); const assert = require('assert'); const execSync = require('child_process').execSync; -const longLine = 'foo bar baz quux quuz aaa bbb ccc'.repeat(65536); +const lineSeed = 'foo bar baz quux quuz aaa bbb ccc'; if (process.argv[2] === 'child') { + const longLine = lineSeed.repeat(parseInt(process.argv[4], 10)); process.on('exit', () => { console.log(longLine); }); process.exit(); } -const cmd = `${process.execPath} ${__filename} child`; -const stdout = execSync(cmd).toString().trim(); +[16, 18, 20].forEach((exponent) => { + const bigNum = Math.pow(2, exponent); + const longLine = lineSeed.repeat(bigNum); + const cmd = `${process.execPath} ${__filename} child ${exponent} ${bigNum}`; + const stdout = execSync(cmd).toString().trim(); + + assert.strictEqual(stdout, longLine, `failed with exponent ${exponent}`); +}); + -assert.strictEqual(stdout, longLine);