mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
457 B
24 lines
457 B
15 years ago
|
require('../common');
|
||
|
|
||
|
exec = require('child_process').exec;
|
||
|
join = require('path').join;
|
||
|
|
||
|
nodePath = process.argv[0];
|
||
|
script = join(fixturesDir, 'print-10-lines.js');
|
||
|
|
||
|
cmd = nodePath + ' ' + script + ' | head -2';
|
||
|
|
||
|
finished = false;
|
||
|
|
||
|
exec(cmd, function (err, stdout, stderr) {
|
||
|
if (err) throw err;
|
||
|
lines = stdout.split('\n');
|
||
|
assert.equal(3, lines.length);
|
||
|
finished = true;
|
||
|
});
|
||
|
|
||
|
|
||
|
process.addListener('exit', function () {
|
||
|
assert.ok(finished);
|
||
|
});
|