Skip to content

Commit a31d316

Browse files
TrottMyles Borins
authored and
Myles Borins
committed
test: add test for exec() known issue
PR-URL: #7375 Refs: #7342 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
1 parent 5290c9d commit a31d316

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
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)