Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 044a0be

Browse filesBrowse files
TrottFishrock123
authored andcommitted
test: add test for exec() known issue
PR-URL: #7375 Refs: #7342 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
1 parent c4d3580 commit 044a0be
Copy full SHA for 044a0be

File tree

Expand file treeCollapse file tree

1 file changed

+16
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+16
-0
lines changed
Open diff view settings
Collapse file
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'use strict';
2+
// Refs: https://github.com/nodejs/node/issues/7342
3+
const common = require('../common');
4+
const assert = require('assert');
5+
const exec = require('child_process').exec;
6+
7+
const expectedCalls = 2;
8+
9+
const cb = common.mustCall((data) => {
10+
assert.strictEqual(typeof data, 'string');
11+
}, expectedCalls);
12+
13+
const command = common.isWindows ? 'dir' : 'ls';
14+
exec(command).stdout.on('data', cb);
15+
16+
exec('fhqwhgads').stderr.on('data', cb);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.