Standardized test incantations
[dbsrgits/DBM-Deep.git] / t / 16_circular.t
index 1b428e2..501435d 100644 (file)
@@ -2,13 +2,12 @@
 # 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 );
 
 ##
@@ -69,6 +68,8 @@ is( $db->{circle}{circle}{circle}{key1}, 'value1', "The value is there in three
 ##
 $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" );