Committed fix for RT#35140
[dbsrgits/DBM-Deep.git] / t / 08_deephash.t
index 11b0877..5e022c3 100644 (file)
@@ -2,9 +2,16 @@
 # DBM::Deep Test
 ##
 use strict;
-use Test::More tests => 5;
+use Test::More;
+
+plan skip_all => "You must set \$ENV{LONG_TESTS} to run the long tests"
+    unless $ENV{LONG_TESTS};
+
+plan tests => 5;
 use t::common qw( new_fh );
 
+diag "This test can take up to a minute to run. Please be patient.";
+
 use_ok( 'DBM::Deep' );
 
 my ($fh, $filename) = new_fh();
@@ -14,6 +21,7 @@ my $max_levels = 1000;
 {
     my $db = DBM::Deep->new(
         file => $filename,
+        fh => $fh,
         type => DBM::Deep->TYPE_HASH,
     );
 
@@ -43,8 +51,10 @@ my $max_levels = 1000;
 }
 
 {
+    open $fh, '+<', $filename;
     my $db = DBM::Deep->new(
         file => $filename,
+        fh => $fh,
         type => DBM::Deep->TYPE_HASH,
     );