Skip to content

Commit 4bfed26

Browse files
addaleaxMyles Borins
authored andcommitted
test: add zlib close-after-error regression test
Add a regression test based on the report in #6034. PR-URL: #6270 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent bad006f commit 4bfed26

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'use strict';
2+
// https://github.com/nodejs/node/issues/6034
3+
4+
constcommon=require('../common');
5+
constassert=require('assert');
6+
constzlib=require('zlib');
7+
8+
constdecompress=zlib.createGunzip(15);
9+
10+
decompress.on('error',common.mustCall((err)=>{
11+
assert.doesNotThrow(()=>decompress.close());
12+
}));
13+
14+
decompress.write('something invalid');

0 commit comments

Comments
 (0)