blob: cddbe86795a967082ff3eca79e67ebdba642ae04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
'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);
}));
|