Backport-PR-URL: https://github.com/nodejs/node/pull/13835 PR-URL: https://github.com/nodejs/node/pull/12735 Refs: https://github.com/nodejs/node/pull/12455 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
15 lines
461 B
JavaScript
15 lines
461 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const util = require('util');
|
|
const assert = require('assert');
|
|
const exec = require('child_process').exec;
|
|
|
|
const cmd = [
|
|
`"${process.execPath}"`, '-e',
|
|
'"console.error(process.argv)"',
|
|
'foo', 'bar'].join(' ');
|
|
const expected = `${util.format([process.execPath, 'foo', 'bar'])}\n`;
|
|
exec(cmd, common.mustCall((err, stdout, stderr) => {
|
|
assert.ifError(err);
|
|
assert.strictEqual(stderr, expected);
|
|
}));
|