1'use strict'; 2// This test verifies that the shell option is not supported by fork(). 3const common = require('../common'); 4const assert = require('assert'); 5const cp = require('child_process'); 6const expected = common.isWindows ? '%foo%' : '$foo'; 7 8if (process.argv[2] === undefined) { 9 const child = cp.fork(__filename, [expected], { 10 shell: true, 11 env: { ...process.env, foo: 'bar' } 12 }); 13 14 child.on('exit', common.mustCall((code, signal) => { 15 assert.strictEqual(code, 0); 16 assert.strictEqual(signal, null); 17 })); 18} else { 19 assert.strictEqual(process.argv[2], expected); 20} 21