summaryrefslogtreecommitdiff
path: root/ext/Compress
diff options
context:
space:
mode:
authorPaul Marquess <paul.marquess@btinternet.com>2005-10-11 23:54:25 +0100
committerSteve Peters <steve@fisharerojo.org>2005-10-11 22:27:18 +0000
commitc067b4bea65bd7b97b0ae4f7b058dd94b44a4c48 (patch)
tree2dfe593537ad842e8c6b8a85560c0f2e39e76659 /ext/Compress
parent42a3dd3a0948c6ac1b200a3fbb116cc84a1b090e (diff)
downloadperl-c067b4bea65bd7b97b0ae4f7b058dd94b44a4c48.tar.gz
Compress::Zlib
This silences a few warnings on AIX p4raw-id: //depot/perl@25739
Diffstat (limited to 'ext/Compress')
-rw-r--r--ext/Compress/Zlib/lib/Compress/Zlib/Common.pm2
-rw-r--r--ext/Compress/Zlib/t/04def.t16
2 files changed, 8 insertions, 10 deletions
diff --git a/ext/Compress/Zlib/lib/Compress/Zlib/Common.pm b/ext/Compress/Zlib/lib/Compress/Zlib/Common.pm
index 443d9b37bb..4f5ea61b03 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 aadba68e4f..b41184b808 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 ;