Skip to content

Commit 16aff79

Browse files
TrottFishrock123
authored andcommitted
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 4486ba9 commit 16aff79

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines 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+
constcommon=require('../common');
4+
constassert=require('assert');
5+
constexec=require('child_process').exec;
6+
7+
constexpectedCalls=2;
8+
9+
constcb=common.mustCall((data)=>{
10+
assert.strictEqual(typeofdata,'string');
11+
},expectedCalls);
12+
13+
constcommand=common.isWindows ? 'dir' : 'ls';
14+
exec(command).stdout.on('data',cb);
15+
16+
exec('fhqwhgads').stderr.on('data',cb);

0 commit comments

Comments
(0)