diff options
Diffstat (limited to 'cpan/IO-Zlib/t/uncomp2.t')
-rw-r--r-- | cpan/IO-Zlib/t/uncomp2.t | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/cpan/IO-Zlib/t/uncomp2.t b/cpan/IO-Zlib/t/uncomp2.t index e760fded40..182b9625a7 100644 --- a/cpan/IO-Zlib/t/uncomp2.t +++ b/cpan/IO-Zlib/t/uncomp2.t @@ -1,33 +1,38 @@ +use strict; +use warnings; + require IO::Zlib; # uncomp2.t is like uncomp1.t but without 'use' sub ok { my ($no, $ok) = @_ ; - - #++ $total ; - #++ $totalBad unless $ok ; - print "ok $no\n" if $ok ; print "not ok $no\n" unless $ok ; } print "1..10\n"; -$hello = <<EOM ; +my $hello = <<EOM ; hello world this is a test EOM -$name = "test$$"; +my $name = "test$$"; -if (open(FH, ">$name")) { +if (open(FH, ">$name")) +{ binmode FH; print FH $hello; close FH; -} else { +} +else +{ die "$name: $!"; } +my $file; +my $uncomp; + ok(1, $file = IO::Zlib->new()); ok(2, $file->open($name, "rb")); ok(3, !$file->eof()); |