New testing feature that allows specification of the workdir for the tests
[dbsrgits/DBM-Deep.git] / t / 07_locking.t
index e2b94dd..09e3c8d 100644 (file)
@@ -3,20 +3,15 @@
 ##
 use strict;
 use Test::More tests => 4;
+use t::common qw( new_fh );
 
 use_ok( 'DBM::Deep' );
 
-##
-# basic file open
-##
-unlink "t/test.db";
+my ($fh, $filename) = new_fh();
 my $db = DBM::Deep->new(
-       file => "t/test.db",
-       locking => 1
+       file => $filename,
+       locking => 1,
 );
-if ($db->error()) {
-       die "ERROR: " . $db->error();
-}
 
 ##
 # basic put/get