2015-05-19 13:00:06 +02:00
|
|
|
'use strict';
|
2015-12-23 16:02:12 -08:00
|
|
|
require('../common');
|
2014-06-11 21:11:28 -07:00
|
|
|
var assert = require('assert');
|
|
|
|
var zlib = require('zlib');
|
|
|
|
|
|
|
|
var closed = false;
|
|
|
|
|
|
|
|
zlib.gzip('hello', function(err, out) {
|
|
|
|
var unzip = zlib.createGunzip();
|
|
|
|
unzip.close(function() {
|
|
|
|
closed = true;
|
|
|
|
});
|
|
|
|
assert.throws(function() {
|
|
|
|
unzip.write(out);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
process.on('exit', function() {
|
|
|
|
assert(closed);
|
|
|
|
});
|