2 use Test::More tests => 9;
4 use t::common qw( new_fh );
8 my ($fh, $filename) = new_fh();
9 my $db = DBM::Deep->new(
21 cmp_ok( $obj->{foo}, '==', 5, "FOO is 5 in the object" );
22 ok( !exists $obj->{bar}, "BAR doesn't exist in the object" );
29 cmp_ok( $db->{foo}{bar}, '==', 1, "The value is visible within the transaction" );
30 cmp_ok( $obj->{bar}, '==', 1, "The value is visible within the object" );
35 local $TODO = "Adding items in transactions will be fixed soon";
37 cmp_ok( $obj->{foo}, '==', 5 );
39 ok( !exists $obj->{bar}, "bar doesn't exist" );
41 local $TODO = "Adding items in transactions will be fixed soon";
42 ok( !tied(%$obj), "And it's not tied" );
45 ok( !exists $db->{foo}, "The transaction inside the DB works" );
54 cmp_ok( $obj->{foo}, '==', 5 );
55 ok( !exists $obj->{bar} );
62 cmp_ok( $db->{foo}{bar}, '==', 1, "The value is visible within the transaction" );
63 cmp_ok( $obj->{bar}, '==', 1, "The value is visible within the object" );
67 cmp_ok( $obj->{foo}, '==', 5 );
68 ok( !exists $obj->{bar} );