mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
The copyright and license notice is already in the LICENSE file. There is no justifiable reason to also require that it be included in every file, since the individual files are not individually distributed except as part of the entire package.
24 lines
585 B
JavaScript
24 lines
585 B
JavaScript
var common = require('../common');
|
|
var assert = require('assert');
|
|
var spawn = require('child_process').spawn;
|
|
|
|
// spawn a node child process in "interactive" mode (force the repl)
|
|
var cp = spawn(process.execPath, ['-i']);
|
|
var gotToEnd = false;
|
|
var timeoutId = setTimeout(function() {
|
|
throw new Error('timeout!');
|
|
}, 1000); // give node + the repl 1 second to boot up
|
|
|
|
cp.stdout.setEncoding('utf8');
|
|
|
|
cp.stdout.once('data', function(b) {
|
|
clearTimeout(timeoutId);
|
|
assert.equal(b, '> ');
|
|
gotToEnd = true;
|
|
cp.kill();
|
|
});
|
|
|
|
process.on('exit', function() {
|
|
assert(gotToEnd);
|
|
});
|