mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
465 B
16 lines
465 B
9 years ago
|
'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') {
|
||
9 years ago
|
console.error(unicode);
|
||
9 years ago
|
} else {
|
||
|
const cmd = `${process.execPath} ${__filename} child`;
|
||
|
|
||
9 years ago
|
cp.exec(cmd, {maxBuffer: 10}, common.mustCall((err, stdout, stderr) => {
|
||
|
assert.strictEqual(err.message, 'stderr maxBuffer exceeded');
|
||
9 years ago
|
}));
|
||
|
}
|