Browse Source

test: add zlib close-after-error regression test

Add a regression test based on the report in
https://github.com/nodejs/node/issues/6034.

PR-URL: https://github.com/nodejs/node/pull/6270
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
process-exit-stdio-flushing
Anna Henningsen 9 years ago
parent
commit
f8e507eaf1
No known key found for this signature in database GPG Key ID: D8B9F5AEAE84E4CF
  1. 14
      test/parallel/test-zlib-close-after-error.js

14
test/parallel/test-zlib-close-after-error.js

@ -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');
Loading…
Cancel
Save