From: Paul Marquess Date: Tue, 11 Oct 2005 22:54:25 +0000 (+0100) Subject: Compress::Zlib X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c067b4bea65bd7b97b0ae4f7b058dd94b44a4c48;p=p5sagit%2Fp5-mst-13.2.git Compress::Zlib This silences a few warnings on AIX p4raw-id: //depot/perl@25739 --- diff --git a/ext/Compress/Zlib/lib/Compress/Zlib/Common.pm b/ext/Compress/Zlib/lib/Compress/Zlib/Common.pm index 443d9b3..4f5ea61 100644 --- a/ext/Compress/Zlib/lib/Compress/Zlib/Common.pm +++ b/ext/Compress/Zlib/lib/Compress/Zlib/Common.pm @@ -27,7 +27,7 @@ sub setBinModeInput($) { my $handle = shift ; - binmode $handle ; + binmode $handle unless $^O eq 'MSWin32' ; #binmode $handle if $] == 5.008 ; #binmode $handle unless isSTDIN($handle) ; } diff --git a/ext/Compress/Zlib/t/04def.t b/ext/Compress/Zlib/t/04def.t index aadba68..b41184b 100644 --- a/ext/Compress/Zlib/t/04def.t +++ b/ext/Compress/Zlib/t/04def.t @@ -20,7 +20,7 @@ BEGIN $extra = 1 if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 }; - plan tests => 1775 + $extra ; + plan tests => 1769 + $extra ; use_ok('Compress::Zlib', 2) ; @@ -222,8 +222,10 @@ EOM my $len ; 1 while ($len = $x->read($uncomp)) > 0 ; + is $len, 0, "read returned 0"; + ok $x->close ; - is $hello, $uncomp ; + is $uncomp, $hello ; } } @@ -1275,9 +1277,8 @@ EOT my $hello = "I am a HAL 9000 computer" x 2001 ; - my ($k, $err) = new $UncompressClass(\$hello, Transparent => 1); + my $k = new $UncompressClass(\$hello, Transparent => 1); ok $k ; - cmp_ok $err, '==', Z_OK ; # Skip to the flush point -- no-op for plain file my $status = $k->inflateSync(); @@ -1315,9 +1316,8 @@ EOT ok $x->close() ; my $k; - ($k, $err) = new $UncompressClass(\$Answer, BlockSize => 1); + $k = new $UncompressClass(\$Answer, BlockSize => 1); ok $k ; - cmp_ok $err, '==', Z_OK ; my $initial; is $k->read($initial, 1), 1 ; @@ -1353,10 +1353,8 @@ EOT ok $x->close() ; - my $k; - ($k, $err) = new $UncompressClass(\$Answer, BlockSize => 1); + my $k = new $UncompressClass(\$Answer, BlockSize => 1); ok $k ; - cmp_ok $err, '==', Z_OK ; my $initial; is $k->read($initial, 1), 1 ;