test: fix zlib version regex

Add support for subrevision in the regular expression for the zlib
version.

Refs: https://github.com/madler/zlib/blob/48c3741002ac/zlib.h#L40
PR-URL: https://github.com/nodejs/node/pull/48227
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Luigi Pinca
2023-05-30 08:11:06 +02:00
committed by GitHub
parent 84716d88d3
commit 6a6b3c5402

View File

@@ -61,7 +61,7 @@ assert.match(process.versions.brotli, commonTemplate);
assert.match(process.versions.llhttp, commonTemplate);
assert.match(process.versions.node, commonTemplate);
assert.match(process.versions.uv, commonTemplate);
assert.match(process.versions.zlib, commonTemplate);
assert.match(process.versions.zlib, /^\d+(?:\.\d+){2,3}(?:-.*)?$/);
if (hasUndici) {
assert.match(process.versions.undici, commonTemplate);