diff options
Diffstat (limited to 'cpan/Compress-Raw-Zlib/t/02zlib.t')
-rw-r--r-- | cpan/Compress-Raw-Zlib/t/02zlib.t | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/cpan/Compress-Raw-Zlib/t/02zlib.t b/cpan/Compress-Raw-Zlib/t/02zlib.t index 6ce990d214..2c9aad6715 100644 --- a/cpan/Compress-Raw-Zlib/t/02zlib.t +++ b/cpan/Compress-Raw-Zlib/t/02zlib.t @@ -27,10 +27,10 @@ BEGIN $count = 232 ; } elsif ($] >= 5.006) { - $count = 310 ; + $count = 317 ; } else { - $count = 268 ; + $count = 275 ; } plan tests => $count + $extra; @@ -908,7 +908,7 @@ SKIP: } { - title "repeated calls to flush"; + title "repeated calls to flush after some compression"; my $hello = "I am a HAL 9000 computer" ; my ($err, $x, $X, $status); @@ -925,6 +925,21 @@ SKIP: is $X, "", "no output from second flush"; } +{ + title "repeated calls to flush - no compression"; + + my $hello = "I am a HAL 9000 computer" ; + my ($err, $x, $X, $status); + + ok( ($x, $err) = new Compress::Raw::Zlib::Deflate ( ), "Create deflate object" ); + isa_ok $x, "Compress::Raw::Zlib::deflateStream" ; + cmp_ok $err, '==', Z_OK, "status is Z_OK" ; + + cmp_ok $x->flush($X, Z_SYNC_FLUSH), '==', Z_OK, "flush returned Z_OK" ; + cmp_ok $x->flush($X, Z_SYNC_FLUSH), '==', Z_OK, "second flush returned Z_OK" ; + is $X, "", "no output from second flush"; +} + exit if $] < 5.006 ; title 'Looping Append test with substr output - substr the end of the string'; |