diff options
Diffstat (limited to 'ext/Compress/Zlib/t/14gzopen.t')
-rw-r--r-- | ext/Compress/Zlib/t/14gzopen.t | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/Compress/Zlib/t/14gzopen.t b/ext/Compress/Zlib/t/14gzopen.t index 97f0a1cb78..d4a3a0d993 100644 --- a/ext/Compress/Zlib/t/14gzopen.t +++ b/ext/Compress/Zlib/t/14gzopen.t @@ -20,7 +20,7 @@ BEGIN { $extra = 1 if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 }; - plan tests => 208 + $extra ; + plan tests => 210 + $extra ; use_ok('Compress::Zlib', 2) ; use_ok('IO::Compress::Gzip::Constants') ; @@ -70,9 +70,17 @@ is $fil->gzread($uncomp), $len; is $fil->gztell(), $len; ok $fil->gzeof() ; + +# gzread after eof bahavior + +my $xyz = "123" ; +is $fil->gzread($xyz), 0, "gzread returns 0 on eof" ; +is $xyz, "", "gzread on eof zaps the output buffer [Match 1,x behavior]" ; + ok ! $fil->gzclose ; ok $fil->gzeof() ; + 1 while unlink $name ; ok $hello eq $uncomp ; |