1445517567518985da1a864935191e7ec4028fbd
[dbsrgits/DBM-Deep.git] / t / 97_dump_file.t
1 use strict;
2 use Test::More tests => 3;
3 use Test::Deep;
4 use t::common qw( new_fh );
5
6 use_ok( 'DBM::Deep' );
7
8 my ($fh, $filename) = new_fh();
9 my $db = DBM::Deep->new(
10         file => $filename,
11 );
12
13 is( $db->_dump_file, <<"__END_DUMP__", "Dump of initial file correct" );
14 NumTxns: 1
15 Chains(B):
16 Chains(D):
17 Chains(I):
18 00000030: H  0064 REF: 1
19 __END_DUMP__
20
21 $db->{foo} = 'bar';
22
23 is( $db->_dump_file, <<"__END_DUMP__", "Dump of initial file correct" );
24 NumTxns: 1
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