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.
25 lines
549 B
25 lines
549 B
'use strict';
|
|
var common = require('../common');
|
|
var assert = require('assert');
|
|
|
|
var exec = require('child_process').exec;
|
|
var join = require('path').join;
|
|
|
|
var nodePath = process.argv[0];
|
|
var script = join(common.fixturesDir, 'print-10-lines.js');
|
|
|
|
var cmd = '"' + nodePath + '" "' + script + '" | head -2';
|
|
|
|
var finished = false;
|
|
|
|
exec(cmd, function(err, stdout, stderr) {
|
|
if (err) throw err;
|
|
var lines = stdout.split('\n');
|
|
assert.equal(3, lines.length);
|
|
finished = true;
|
|
});
|
|
|
|
|
|
process.on('exit', function() {
|
|
assert.ok(finished);
|
|
});
|
|
|