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.
27 lines
521 B
JavaScript
27 lines
521 B
JavaScript
var common = require('../common');
|
|
var assert = require('assert');
|
|
|
|
var zlib = require('zlib');
|
|
var gz = zlib.Gzip()
|
|
var emptyBuffer = new Buffer(0);
|
|
var received = 0;
|
|
gz.on('data', function(c) {
|
|
received += c.length;
|
|
});
|
|
var ended = false;
|
|
gz.on('end', function() {
|
|
ended = true;
|
|
});
|
|
var finished = false;
|
|
gz.on('finish', function() {
|
|
finished = true;
|
|
});
|
|
gz.write(emptyBuffer);
|
|
gz.end();
|
|
|
|
process.on('exit', function() {
|
|
assert.equal(received, 20);
|
|
assert(ended);
|
|
assert(finished);
|
|
console.log('ok');
|
|
});
|