This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update IO-Compress to CPAN version 2.049
[perl5.git] / cpan / IO-Compress / t / cz-14gzopen.t
index 0918ce5..d5f0ea0 100644 (file)
@@ -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 ;