5 use Test::More tests => 10;
7 use t::common qw( new_fh );
11 my ($fh, $filename) = new_fh();
12 my $db = DBM::Deep->new(
17 $db->{bar} = $db->{foo};
19 is( $db->{foo}, 5, "Foo is still 5" );
20 is( $db->{bar}, 5, "Bar is now 5" );
24 is( $db->{foo}, 6, "Foo is now 6" );
25 is( $db->{bar}, 5, "Bar is still 5" );
27 $db->{foo} = [ 1 .. 3 ];
28 $db->{bar} = $db->{foo};
30 is( $db->{foo}[1], 2, "Foo[1] is still 2" );
31 is( $db->{bar}[1], 2, "Bar[1] is now 2" );
35 is( $db->{foo}[3], 42, "Foo[3] is now 42" );
36 is( $db->{bar}[3], 42, "Bar[3] is also 42" );
39 is( $db->{bar}[3], 42, "After delete Foo, Bar[3] is still 42" );