diff options
author | Rich Trott <rtrott@gmail.com> | 2016-06-22 16:21:21 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2016-06-24 16:30:25 -0700 |
commit | c96457403eef895a5541429404207c1985df240f (patch) | |
tree | 086b2fba29100f84c05b639a117da38116da554e /test/known_issues | |
parent | 0b9e135c3eaf9b83671b1ecbaa1aa4ba700a8add (diff) | |
download | android-node-v8-c96457403eef895a5541429404207c1985df240f.tar.gz android-node-v8-c96457403eef895a5541429404207c1985df240f.tar.bz2 android-node-v8-c96457403eef895a5541429404207c1985df240f.zip |
test: add test for exec() known issue
PR-URL: https://github.com/nodejs/node/pull/7375
Refs: https://github.com/nodejs/node/issues/7342
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Diffstat (limited to 'test/known_issues')
-rw-r--r-- | test/known_issues/test-child-process-exec-stdout-data-string.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/known_issues/test-child-process-exec-stdout-data-string.js b/test/known_issues/test-child-process-exec-stdout-data-string.js new file mode 100644 index 0000000000..b267ff5e98 --- /dev/null +++ b/test/known_issues/test-child-process-exec-stdout-data-string.js @@ -0,0 +1,16 @@ +'use strict'; +// Refs: https://github.com/nodejs/node/issues/7342 +const common = require('../common'); +const assert = require('assert'); +const exec = require('child_process').exec; + +const expectedCalls = 2; + +const cb = common.mustCall((data) => { + assert.strictEqual(typeof data, 'string'); +}, expectedCalls); + +const command = common.isWindows ? 'dir' : 'ls'; +exec(command).stdout.on('data', cb); + +exec('fhqwhgads').stderr.on('data', cb); |