Tagged 0.983 and removed the branch
[dbsrgits/DBM-Deep.git] / t / 19_crossref.t
diff --git a/t/19_crossref.t b/t/19_crossref.t
deleted file mode 100644 (file)
index 339c14c..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-##
-# DBM::Deep Test
-##
-use strict;
-use Test::More tests => 15;
-
-use_ok( 'DBM::Deep' );
-
-unlink "t/test.db";
-my $db = DBM::Deep->new( "t/test.db" );
-if ($db->error()) {
-       die "ERROR: " . $db->error();
-}
-
-unlink "t/test2.db";
-my $db2 = DBM::Deep->new( "t/test2.db" );
-if ($db2->error()) {
-       die "ERROR: " . $db2->error();
-}
-
-##
-# Create structure in $db
-##
-$db->import(
-       hash1 => {
-               subkey1 => "subvalue1",
-               subkey2 => "subvalue2"
-       }
-);
-
-is( $db->{hash1}{subkey1}, 'subvalue1', "Value imported correctly" );
-is( $db->{hash1}{subkey2}, 'subvalue2', "Value imported correctly" );
-
-##
-# Cross-ref nested hash accross DB objects
-##
-$db2->{copy} = $db->{hash1};
-
-$db->{hash1}{subkey3} = 'where does this go?';
-is( $db->{hash1}{subkey3}, 'where does this go?' );
-
-$db2->{copy}{subkey4} = 'from the other side';
-is( $db2->{copy}{subkey4}, 'from the other side' );
-
-########
-# This is the failure case
-#
-{
-    my $left = $db->{hash1};
-    $db2->{right} = $left;
-
-    $db2->{right}{rightward} = 'floober';
-    is( $db2->{right}{rightward}, 'floober' );
-    isnt( $db->{hash1}{rightward}, 'floober' );
-}
-#
-#
-########
-
-##
-# close, delete $db
-##
-undef $db;
-
-{
-    my $db3 = DBM::Deep->new( 't/test.db' );
-    if ($db3->error()) {
-        die "ERROR: " . $db3->error();
-    }
-    is( $db3->{hash1}{subkey1}, 'subvalue1' );
-    is( $db3->{hash1}{subkey2}, 'subvalue2' );
-    is( $db3->{hash1}{subkey3}, 'where does this go?' );
-    isnt( $db3->{hash1}{subkey4}, 'from the other side' );
-}
-
-unlink "t/test.db";
-
-##
-# Make sure $db2 has copy of $db's hash structure
-##
-is( $db2->{copy}{subkey1}, 'subvalue1', "Value copied correctly" );
-is( $db2->{copy}{subkey2}, 'subvalue2', "Value copied correctly" );
-isnt( $db2->{copy}{subkey3}, 'where does this go?' );
-is( $db2->{copy}{subkey4}, 'from the other side' );