Skip to content

Commit

Permalink
test: add zlib close-after-error regression test
Browse files Browse the repository at this point in the history
Add a regression test based on the report in
#6034.

PR-URL: #6270
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
addaleax authored and Myles Borins committed Apr 20, 2016
1 parent bad006f commit 4bfed26
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/parallel/test-zlib-close-after-error.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';
// https://github.com/nodejs/node/issues/6034

const common = require('../common');
const assert = require('assert');
const zlib = require('zlib');

const decompress = zlib.createGunzip(15);

decompress.on('error', common.mustCall((err) => {
assert.doesNotThrow(() => decompress.close());
}));

decompress.write('something invalid');

0 comments on commit 4bfed26

Please sign in to comment.