Commit | Line | Data |
888453b9 |
1 | use strict; |
0e3e3555 |
2 | use warnings FATAL => 'all'; |
3 | |
4 | use Test::More; |
888453b9 |
5 | use Test::Deep; |
6 | use t::common qw( new_fh ); |
7 | |
8 | use_ok( 'DBM::Deep' ); |
9 | |
10 | my ($fh, $filename) = new_fh(); |
33d7395d |
11 | my $db = DBM::Deep->new( $filename ); |
888453b9 |
12 | |
13 | is( $db->_dump_file, <<"__END_DUMP__", "Dump of initial file correct" ); |
c57b19c6 |
14 | NumTxns: 1 |
888453b9 |
15 | Chains(B): |
16 | Chains(D): |
17 | Chains(I): |
18 | 00000030: H 0064 REF: 1 |
19 | __END_DUMP__ |
20 | |
21 | $db->{foo} = 'bar'; |
22 | |
0e3e3555 |
23 | is( $db->_dump_file, <<"__END_DUMP__", "Dump of file after single assignment" ); |
c57b19c6 |
24 | NumTxns: 1 |
888453b9 |
25 | Chains(B): |
26 | Chains(D): |
27 | Chains(I): |
28 | 00000030: H 0064 REF: 1 |
29 | 00000094: D 0064 bar |
30 | 00000158: B 0387 |
31 | 00000545 00000094 |
32 | 00000545: D 0064 foo |
33 | __END_DUMP__ |
34 | |
0e3e3555 |
35 | done_testing; |