xref: /third_party/node/test/parallel/test-zlib-write-after-end.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ciconst common = require('../common');
31cb0ef41Sopenharmony_ciconst zlib = require('zlib');
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ci// Regression test for https://github.com/nodejs/node/issues/30976
61cb0ef41Sopenharmony_ci// Writes to a stream should finish even after the readable side has been ended.
71cb0ef41Sopenharmony_ci
81cb0ef41Sopenharmony_ciconst data = zlib.deflateRawSync('Welcome');
91cb0ef41Sopenharmony_ci
101cb0ef41Sopenharmony_ciconst inflate = zlib.createInflateRaw();
111cb0ef41Sopenharmony_ci
121cb0ef41Sopenharmony_ciinflate.resume();
131cb0ef41Sopenharmony_ciinflate.write(data, common.mustCall());
141cb0ef41Sopenharmony_ciinflate.write(Buffer.from([0x00]), common.mustCall());
151cb0ef41Sopenharmony_ciinflate.write(Buffer.from([0x00]), common.mustCall());
161cb0ef41Sopenharmony_ciinflate.flush(common.mustCall());
17

Indexes created Thu Nov 07 10:32:03 CST 2024