Skip to content

Commit

Permalink
replicated mnot's bug in whichNodeEmpty test
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Feb 1, 2011
1 parent fad6a64 commit 63df2f3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/_.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ exports.nodeArgs = function () {
testCmd('node bin.js', [ 'x', 'y', 'z' ]);
};

exports.whichNodeEmpty = function () {
var which = spawn('which', ['node']);

which.stdout.on('data', function (buf) {
testCmd(buf.toString().trim() + ' bin.js', []);
});

which.stderr.on('data', function (err) {
assert.fail(err.toString());
});
};

function testCmd (cmd, args) {
var to = setTimeout(function () {
assert.fail('Never got stdout data.')
Expand Down

0 comments on commit 63df2f3

Please sign in to comment.