Standardized test incantations
[dbsrgits/DBM-Deep.git] / t / 09_deeparray.t
index d9ba676..a9260e6 100644 (file)
@@ -2,13 +2,19 @@
 # DBM::Deep Test
 ##
 use strict;
-use Test::More tests => 3;
-use File::Temp qw( tempfile tempdir );
+use Test::More;
+
+plan skip_all => "You must set \$ENV{LONG_TESTS} to run the long tests"
+    unless $ENV{LONG_TESTS};
+
+plan tests => 3;
+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 $dir = tempdir( CLEANUP => 1 );
-my ($fh, $filename) = tempfile( 'tmpXXXX', UNLINK => 1, DIR => $dir );
+my ($fh, $filename) = new_fh();
 
 my $max_levels = 1000;
 
@@ -28,6 +34,7 @@ my $max_levels = 1000;
 }
 
 {
+    open $fh, '+<', $filename;
     my $db = DBM::Deep->new(
         file => $filename,
         type => DBM::Deep->TYPE_ARRAY,