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.
42 lines
818 B
JavaScript
42 lines
818 B
JavaScript
var common = require('../common');
|
|
var assert = require('assert');
|
|
|
|
var spawn = require('child_process').spawn;
|
|
|
|
var is_windows = process.platform === 'win32';
|
|
|
|
var exitCode;
|
|
var termSignal;
|
|
var gotStdoutEOF = false;
|
|
var gotStderrEOF = false;
|
|
|
|
var cat = spawn(is_windows ? 'cmd' : 'cat');
|
|
|
|
|
|
cat.stdout.on('end', function() {
|
|
gotStdoutEOF = true;
|
|
});
|
|
|
|
cat.stderr.on('data', function(chunk) {
|
|
assert.ok(false);
|
|
});
|
|
|
|
cat.stderr.on('end', function() {
|
|
gotStderrEOF = true;
|
|
});
|
|
|
|
cat.on('exit', function(code, signal) {
|
|
exitCode = code;
|
|
termSignal = signal;
|
|
});
|
|
|
|
assert.equal(cat.killed, false);
|
|
cat.kill();
|
|
assert.equal(cat.killed, true);
|
|
|
|
process.on('exit', function() {
|
|
assert.strictEqual(exitCode, null);
|
|
assert.strictEqual(termSignal, 'SIGTERM');
|
|
assert.ok(gotStdoutEOF);
|
|
assert.ok(gotStderrEOF);
|
|
});
|