diff options
Diffstat (limited to 'cpan/IO-Zlib/t/uncomp1.t')
-rw-r--r-- | cpan/IO-Zlib/t/uncomp1.t | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/cpan/IO-Zlib/t/uncomp1.t b/cpan/IO-Zlib/t/uncomp1.t index 884af47bb7..734b46c8cf 100644 --- a/cpan/IO-Zlib/t/uncomp1.t +++ b/cpan/IO-Zlib/t/uncomp1.t @@ -1,33 +1,38 @@ +use strict; +use warnings; + use IO::Zlib; 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()); @@ -42,4 +47,3 @@ unlink($name); ok(9, $hello eq $uncomp); ok(10, !defined(IO::Zlib->new($name, "rb"))); - |