New testing feature that allows specification of the workdir for the tests
[dbsrgits/DBM-Deep.git] / t / 01_basic.t
index 194812d..3c7e88d 100644 (file)
@@ -3,8 +3,8 @@
 ##
 use strict;
 use Test::More tests => 3;
-use File::Temp qw( tempfile tempdir );
-use Fcntl qw( :flock );
+
+use t::common qw( new_fh );
 
 diag "Testing DBM::Deep against Perl $] located at $^X";
 
@@ -13,9 +13,7 @@ use_ok( 'DBM::Deep' );
 ##
 # basic file open
 ##
-my $dir = tempdir( CLEANUP => 1 );
-my ($fh, $filename) = tempfile( 'tmpXXXX', DIR => $dir );
-flock $fh, LOCK_UN;
+my ($fh, $filename) = new_fh();
 my $db = eval {
     local $SIG{__DIE__};
     DBM::Deep->new( $filename );