On Thu, 17 Nov 2022 19:10:49 +0000, Niko Tyni wrote: > > > From the log: > > > not ok 2 - ZLIB_VERSION (1.2.11) matches > > > Compress::Raw::Zlib::zlib_version > > > # Failed test (t/compress/CompTestUtils.pm at line 61) > > > # got: '1.2.11' > > > # expected: '1.2.13' > > Hu? > Uh, I was debugging this manually with 'perl t/02zlib.t' > and must have mixed up the logs. Sorry!
No worries, I guessed later that you might have done some manual
debugging.
> > Some quick thoughts:
> > - we could play with zlib_version vs. ZLIB_VERSION (1.2.13 vs.
> > 1.2.11, according to t/000prereq.t) in t/02zlib.t
> Yeah I guess that's the way to go if we want to allow the version skew.
> I think I have a slight preference for this over the rebuild solution.
Alright.
So something like this?
#v+
--- a/t/02zlib.t.orig 2022-11-17 19:42:16.512726239 +0000
+++ b/t/02zlib.t 2022-11-17 19:45:06.421757489 +0000
@@ -12,7 +12,7 @@
use Test::More ;
-use constant ZLIB_1_2_12_0 => 0x12C0;
+use constant ZLIB_1_2_12_0 => '1.2.12';
BEGIN
{
@@ -489,7 +489,7 @@
# Z_STREAM_END returned by 1.12.2, Z_DATA_ERROR for older zlib
# ZLIB_NG has the fix for all versions
- if (ZLIB_VERNUM >= ZLIB_1_2_12_0 || Compress::Raw::Zlib::is_zlibng)
+ if ($Zlib_ver gt ZLIB_1_2_12_0 || Compress::Raw::Zlib::is_zlibng)
{
cmp_ok $status, '==', Z_STREAM_END ;
}
@@ -523,7 +523,7 @@
$GOT = '';
$status = $k->inflate($rest, $GOT);
# Z_STREAM_END returned by 1.12.2, Z_DATA_ERROR for older zlib
- if (ZLIB_VERNUM >= ZLIB_1_2_12_0 || Compress::Raw::Zlib::is_zlibng)
+ if ($Zlib_ver gt ZLIB_1_2_12_0 || Compress::Raw::Zlib::is_zlibng)
{
cmp_ok $status, '==', Z_STREAM_END ;
}
#v-
$Zlib_ver comes from line 44:
my $Zlib_ver = Compress::Raw::Zlib::zlib_version ;
And I'm never sure if 'gt' is a good idea for comparing versions or I
should wrap my head around version->parse().
Cheers,
gregor
--
.''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org
: :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06
`. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
`-
signature.asc
Description: Digital Signature

