| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,20 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + // Refs: https://github.com/nodejs/node/issues/2148 | ||
| 3 | + | ||
| 4 | + require('../common'); | ||
| 5 | + const assert = require('assert'); | ||
| 6 | + const execSync = require('child_process').execSync; | ||
| 7 | + | ||
| 8 | + const longLine = 'foo bar baz quux quuz aaa bbb ccc'.repeat(65536); | ||
| 9 | + | ||
| 10 | + if (process.argv[2] === 'child') { | ||
| 11 | + process.on('exit', () => { | ||
| 12 | + console.log(longLine); | ||
| 13 | + }); | ||
| 14 | + process.exit(); | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + const cmd = `${process.execPath} ${__filename} child`; | ||
| 18 | + const stdout = execSync(cmd).toString().trim(); | ||
| 19 | + | ||
| 20 | + assert.strictEqual(stdout, longLine); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments