2 // Refs: https://github.com/nodejs/node/issues/1901
3 const common = require('../common');
4 const assert = require('assert');
5 const cp = require('child_process');
6 const unicode = '中文测试'; // Length = 4, Byte length = 13
8 if (process.argv[2] === 'child') {
11 const cmd = `${process.execPath} ${__filename} child`;
13 cp.exec(cmd, { maxBuffer: 10 }, common.mustCall((err, stdout, stderr) => {
14 assert.strictEqual(err.message, 'stdout maxBuffer exceeded');