Skip to content

Commit 63eb5d3

Browse files
committed
Disable zib header tests
1 parent af51310 commit 63eb5d3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

t/005defhdr.t

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ BEGIN {
1919
$extra = 1
2020
if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 };
2121

22-
plan tests => 595 + $extra ;
22+
plan tests => 114 + $extra ;
2323

2424
use_ok('Compress::Raw::Zlib') ;
2525

@@ -123,6 +123,7 @@ EOM
123123

124124
}
125125

126+
if (0) # disable these tests: IO::Compress::Deflate doesn't create the zlib header itself so no need to test
126127
{
127128
title "Check user-defined header settings match zlib" ;
128129

@@ -168,8 +169,9 @@ EOM
168169

169170
my $hdr1 = ReadHeaderInfoZlib($string, %$opts);
170171

171-
# zlib-ng with Level 1 sets the CINFO value to 5 for some reason. All others use expected value of 7
172-
my $cinfoValue = Compress::Raw::Zlib::is_zlibng() && defined $opts->{'-Level'} && $opts->{'-Level'} == 1 ? 5 : 7;
172+
# zlib-ng <= 2.0.6 with Level 1 sets the CINFO value to 5 . All other zlib & zlib-ng use expected value of 7
173+
# Note that zlib-ng 2.0.x uses a 16-bit encoding for ZLIBNG_VERNUM
174+
my $cinfoValue = Compress::Raw::Zlib::is_zlibng() && Compress::Raw::Zlib::ZLIBNG_VERNUM() <= 0x2060 && defined $opts->{'-Level'} && $opts->{'-Level'} == 1 ? 5 : 7;
173175
is $hdr->{CM}, 8, " CM is 8";
174176
is $hdr->{CINFO}, $cinfoValue, " CINFO is $cinfoValue";
175177
is $hdr->{FDICT}, 0, " FDICT is 0";

0 commit comments

Comments
 (0)