# DBM::Deep Test
##
use strict;
-use Test::More tests => 31;
-use File::Temp qw( tempfile tempdir );
+use Test::More tests => 32;
+use t::common qw( new_fh );
use_ok( 'DBM::Deep' );
-my $dir = tempdir( CLEANUP => 1 );
-my ($fh, $filename) = tempfile( 'tmpXXXX', UNLINK => 1, DIR => $dir );
+my ($fh, $filename) = new_fh();
my $db = DBM::Deep->new( $filename );
##
##
$db->{key1} = "another value";
+isnt( $db->{key3}, 'another value', "Simple scalars are copied by value" );
+
is( $db->{key1}, 'another value', "The value is there directly" );
is( $db->{circle}{key1}, 'another value', "The value is there in one loop of the circle" );
is( $db->{circle}{circle}{key1}, 'another value', "The value is there in two loops of the circle" );