Skip to content

Commit 2ef1ebe

Browse files
committed
test: fix zlib round-trip test parameters
Skip gzip with windowBits set to 8 in the PUMMEL matrix, since gzip requires a value of at least 9. Rejection of 8 is tested separately. Pass chunkSize to the compression and decompression constructors so the buffer sizes selected by the test are actually exercised. Signed-off-by: Lluis Semper Lloret lluisemper@gmail.com
1 parent e463b48 commit 2ef1ebe

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎test/parallel/test-zlib.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,11 @@ testKeys.forEach(common.mustCall((file) => {
201201
zlibPairs.forEach(common.mustCall((pair) => {
202202
const Def = pair[0];
203203
const Inf = pair[1];
204-
const opts = { level, windowBits, memLevel, strategy };
204+
// Gzip requires windowBits >= 9; rejection of 8 is tested above.
205+
if (Def === zlib.Gzip && windowBits === 8) {
206+
return;
207+
}
208+
const opts = { level, windowBits, memLevel, strategy, chunkSize };
205209

206210
const def = new Def(opts);
207211
const inf = new Inf(opts);

0 commit comments

Comments
 (0)