File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ BEGIN {
19
19
$extra = 1
20
20
if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 };
21
21
22
- plan tests => 595 + $extra ;
22
+ plan tests => 114 + $extra ;
23
23
24
24
use_ok(' Compress::Raw::Zlib' ) ;
25
25
123
123
124
124
}
125
125
126
+ if (0) # disable these tests: IO::Compress::Deflate doesn't create the zlib header itself so no need to test
126
127
{
127
128
title " Check user-defined header settings match zlib" ;
128
129
168
169
169
170
my $hdr1 = ReadHeaderInfoZlib($string , %$opts );
170
171
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;
173
175
is $hdr -> {CM }, 8, " CM is 8" ;
174
176
is $hdr -> {CINFO }, $cinfoValue , " CINFO is $cinfoValue " ;
175
177
is $hdr -> {FDICT }, 0, " FDICT is 0" ;
You can’t perform that action at this time.
0 commit comments