Update Archive::Tar to 1.31
[p5sagit/p5-mst-13.2.git] / lib / Archive / Tar / t / 02_methods.t
index b8c7ab2..0f13b3c 100644 (file)
@@ -134,6 +134,18 @@ chmod 0644, $COMPRESS_FILE;
     ### check if ->error eq $error
     is( $tar->error, $Archive::Tar::error,
                                     '$error matches error() method' );
+                     
+    ### check that 'contains_file' doesn't warn about missing files.                     
+    {   ### turn on warnings in general!
+        local $Archive::Tar::WARN  = 1;
+
+        my $warnings = '';
+        local $SIG{__WARN__} = sub { $warnings .= "@_" };
+        
+        my $rv = $tar->contains_file( $$ );
+        ok( !$rv,                   "Does not contain file '$$'" );
+        is( $warnings, '',          "   No warnings issued during lookup" );
+    }        
 }
 
 ### read tests ###