Removed final vestiges of misunderstandings
[dbsrgits/DBM-Deep.git] / t / 22_internal_copy.t
index 000519f..9de69f4 100644 (file)
@@ -3,11 +3,12 @@
 ##
 use strict;
 use Test::More tests => 13;
+use t::common qw( new_fh );
 
 use_ok( 'DBM::Deep' );
 
-unlink "t/test.db";
-my $db = DBM::Deep->new( "t/test.db" );
+my ($fh, $filename) = new_fh();
+my $db = DBM::Deep->new( $filename );
 
 ##
 # Create structure in $db
@@ -44,12 +45,11 @@ is( scalar(keys %{$db->{hash1}}), 1, "... and only 1 key in the original" );
 
 $db->{copy} = $db->{hash2};
 is( $db->{copy}{subkey3}, 'subvalue3', "After the second copy, we're still good" );
-
 my $max_keys = 1000;
 
-unlink 't/test2.db';
+my ($fh2, $filename2) = new_fh();
 {
-    my $db = DBM::Deep->new( 't/test2.db' );
+    my $db = DBM::Deep->new( $filename2 );
 
     $db->{foo} = [ 1 .. 3 ];
     for ( 0 .. $max_keys ) {
@@ -58,7 +58,7 @@ unlink 't/test2.db';
 }
 
 {
-    my $db = DBM::Deep->new( 't/test2.db' );
+    my $db = DBM::Deep->new( $filename2 );
 
     my $base_offset = $db->{foo}->_base_offset;
     my $count = -1;