8 #++ $totalBad unless $ok ;
10 print "ok $no\n" if $ok ;
11 print "not ok $no\n" unless $ok ;
18 @text = (<<EOM, <<EOM, <<EOM, <<EOM) ;
23 the line after the previous line
28 $text = join("", @text) ;
30 ok(1, $file = IO::Zlib->new($name, "wb"));
31 ok(2, $file->print($text));
32 ok(3, $file->close());
34 ok(4, $file = IO::Zlib->new($name, "rb"));
36 ok(6, $file->getline() eq $text[0]);
37 ok(7, $file->getline() eq $text[1]);
38 ok(8, $file->getline() eq $text[2]);
39 ok(9, $file->getline() eq $text[3]);
40 ok(10, !defined($file->getline()));
42 ok(12, $file->close());
44 ok(13, $file = IO::Zlib->new($name, "rb"));
45 ok(14, !$file->eof());
46 eval '$file->getlines';
47 ok(15, $@ =~ /^IO::Zlib::getlines: must be called in list context /);
48 ok(16, @lines = $file->getlines());
49 ok(17, @lines == @text);
50 ok(18, $lines[0] eq $text[0]);
51 ok(19, $lines[1] eq $text[1]);
52 ok(20, $lines[2] eq $text[2]);
53 ok(21, $lines[3] eq $text[3]);
55 ok(23, $file->close());