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(
20 cmp_ok( $obj->{foo}, '==', 5 );
21 ok( !exists $obj->{bar} );
28 cmp_ok( $db->{foo}{bar}, '==', 1, "The value is visible within the transaction" );
29 cmp_ok( $obj->{bar}, '==', 1, "The value is visible within the object" );
34 local $TODO = "Adding items in transactions will be fixed soon";
36 cmp_ok( $obj->{foo}, '==', 5 );
38 ok( !exists $obj->{bar}, "bar doesn't exist" );
40 local $TODO = "Adding items in transactions will be fixed soon";
41 ok( !tied(%$obj), "And it's not tied" );
44 ok( !exists $db->{foo}, "The transaction inside the DB works" );
53 cmp_ok( $obj->{foo}, '==', 5 );
54 ok( !exists $obj->{bar} );
61 cmp_ok( $db->{foo}{bar}, '==', 1, "The value is visible within the transaction" );
62 cmp_ok( $obj->{bar}, '==', 1, "The value is visible within the object" );
66 cmp_ok( $obj->{foo}, '==', 5 );
67 ok( !exists $obj->{bar} );