mirror of https://github.com/lukechilds/node.git
Browse Source
This reverts commit c9a5990a76
.
PR-URL: https://github.com/nodejs/node/pull/7391
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
v7.x
4 changed files with 33 additions and 57 deletions
@ -1,4 +1,5 @@ |
|||||
'use strict'; |
'use strict'; |
||||
|
// Refs: https://github.com/nodejs/node/issues/1901
|
||||
const common = require('../common'); |
const common = require('../common'); |
||||
const assert = require('assert'); |
const assert = require('assert'); |
||||
const cp = require('child_process'); |
const cp = require('child_process'); |
@ -1,15 +0,0 @@ |
|||||
'use strict'; |
|
||||
const common = require('../common'); |
|
||||
const assert = require('assert'); |
|
||||
const cp = require('child_process'); |
|
||||
const unicode = '中文测试'; // Length = 4, Byte length = 13
|
|
||||
|
|
||||
if (process.argv[2] === 'child') { |
|
||||
console.error(unicode); |
|
||||
} else { |
|
||||
const cmd = `${process.execPath} ${__filename} child`; |
|
||||
|
|
||||
cp.exec(cmd, {maxBuffer: 10}, common.mustCall((err, stdout, stderr) => { |
|
||||
assert.strictEqual(err.message, 'stderr maxBuffer exceeded'); |
|
||||
})); |
|
||||
} |
|
Loading…
Reference in new issue