Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: add test for exec() known issue
Refs: #7342
  • Loading branch information
Trott committed Jun 23, 2016
commit c4a7f575e41a7f2652c98f39e90792a921eaa292
15 changes: 15 additions & 0 deletions test/known_issues/test-child-process-exec-stdout-data-string.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'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 keepAlive = setInterval(() => {}, 9999);

const command = common.isWindows ? 'dir' : 'ls';
const e = exec(command);

e.stdout.on('data', function(data) {
assert.strictEqual(typeof data, 'string');
clearInterval(keepAlive);
});