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 coverage for child_process bounds check · nodejs/node@4cb4803

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-cli-eval.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-cli-eval.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-cli-eval.js
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,17 @@ child.exec(`${nodejs} --use-strict -p process.execArgv`,
117117
assert.strictEqual(stdout, '');
118118
assert.strictEqual(stderr, '');
119119
}));
120+
121+
// Make sure that monkey-patching process.execArgv doesn't cause child_process
122+
// to incorrectly munge execArgv.
123+
child.exec(
124+
`${nodejs} -e "process.execArgv = ['-e', 'console.log(42)', 'thirdArg'];` +
125+
`require('child_process').fork('${emptyFile}')"`,
126+
common.mustCall((err, stdout, stderr) => {
127+
assert.ifError(err);
128+
assert.strictEqual(stdout, '42\n');
129+
assert.strictEqual(stderr, '');
130+
}));
120131
}
121132

122133
// Regression test for https://github.com/nodejs/node/issues/8534.

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.