X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/8b782679b6ea1247bd559efc311e7366582feaad..785e05e1c22f7d7c6ed38839cc28cc6d13a286de:/cpan/IO-Compress/t/cz-14gzopen.t diff --git a/cpan/IO-Compress/t/cz-14gzopen.t b/cpan/IO-Compress/t/cz-14gzopen.t index 0918ce5..d5f0ea0 100644 --- a/cpan/IO-Compress/t/cz-14gzopen.t +++ b/cpan/IO-Compress/t/cz-14gzopen.t @@ -20,7 +20,7 @@ BEGIN { $extra = 1 if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 }; - plan tests => 260 + $extra ; + plan tests => 264 + $extra ; use_ok('Compress::Zlib', 2) ; use_ok('IO::Compress::Gzip::Constants') ; @@ -651,7 +651,20 @@ foreach my $stdio ( ['-', '-'], [*STDIN, *STDOUT]) } { - title 'gzflush called twice'; + title 'gzflush called twice with Z_SYNC_FLUSH - no compression'; + + my $lex = new LexFile my $name ; + + ok my $a = gzopen($name, "w"); + + is $a->gzflush(Z_SYNC_FLUSH), Z_OK, "gzflush returns Z_OK"; + is $a->gzflush(Z_SYNC_FLUSH), Z_OK, "gzflush returns Z_OK"; +} + + + +{ + title 'gzflush called twice - after compression'; my $lex = new LexFile my $name ;