Standardized test incantations
[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( $filename );
10
11 is( $db->_dump_file, <<"__END_DUMP__", "Dump of initial file correct" );
12 NumTxns: 1
13 Chains(B):
14 Chains(D):
15 Chains(I):
16 00000030: H  0064 REF: 1
17 __END_DUMP__
18
19 $db->{foo} = 'bar';
20
21 is( $db->_dump_file, <<"__END_DUMP__", "Dump of initial file correct" );
22 NumTxns: 1
23 Chains(B):
24 Chains(D):
25 Chains(I):
26 00000030: H  0064 REF: 1
27 00000094: D  0064 bar
28 00000158: B  0387
29     00000545 00000094
30 00000545: D  0064 foo
31 __END_DUMP__
32