GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: add test for fork() + shell · nodejs/node@427bf80

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-child-process-fork-no-shell.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-child-process-fork-no-shell.js‎

Copy file name to clipboard
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
'use strict';
2+
// This test verifies that the shell option is not supported by fork().
3+
const common = require('../common');
4+
const assert = require('assert');
5+
const cp = require('child_process');
6+
const expected = common.isWindows ? '%foo%' : '$foo';
7+
8+
if (process.argv[2] === undefined) {
9+
const child = cp.fork(__filename, [expected], {
10+
shell: true,
11+
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+
}

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.