mirror of
https://github.com/nodejs/node.git
synced 2024-11-25 08:19:38 +01:00
785481149d
spawnSync() modifies the options argument. This commit makes a copy of options before any modifications occur. Fixes: https://github.com/iojs/io.js/issues/576 PR-URL: https://github.com/iojs/io.js/pull/579 Reviewed-By: Bert Belder <bertbelder@gmail.com>
20 lines
505 B
JavaScript
20 lines
505 B
JavaScript
var common = require('../common');
|
|
var assert = require('assert');
|
|
var spawn = require('child_process').spawn;
|
|
|
|
var options = {stdio: ['pipe']};
|
|
var child = common.spawnPwd(options);
|
|
|
|
assert.notEqual(child.stdout, null);
|
|
assert.notEqual(child.stderr, null);
|
|
|
|
options = {stdio: 'ignore'};
|
|
child = common.spawnPwd(options);
|
|
|
|
assert.equal(child.stdout, null);
|
|
assert.equal(child.stderr, null);
|
|
|
|
options = {stdio: 'ignore'};
|
|
child = common.spawnSyncCat(options);
|
|
assert.deepEqual(options, {stdio: 'ignore'});
|