Skip to content

Commit

Permalink
test: add test for exec() known issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott committed Jun 22, 2016
1 parent efebd0b commit ad5b897
Showing 1 changed file with 15 additions and 0 deletions.
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);
});

0 comments on commit ad5b897

Please sign in to comment.