Added a test for dump_file within the core tests and got all subs to be called at...
[dbsrgits/DBM-Deep.git] / t / 97_dump_file.t
CommitLineData
d005c2e8 1use strict;
2use Test::More tests => 3;
3use Test::Deep;
4use t::common qw( new_fh );
5
6use_ok( 'DBM::Deep' );
7
8my ($fh, $filename) = new_fh();
9my $db = DBM::Deep->new(
10 file => $filename,
11);
12
13is( $db->_dump_file, <<"__END_DUMP__", "Dump of initial file correct" );
14Chains(B):
15Chains(D):
16Chains(I):
1700000030: H 0064 REF: 1
18__END_DUMP__
19
20$db->{foo} = 'bar';
21
22is( $db->_dump_file, <<"__END_DUMP__", "Dump of initial file correct" );
23Chains(B):
24Chains(D):
25Chains(I):
2600000030: H 0064 REF: 1
2700000094: D 0064 bar
2800000158: B 0387
29 00000545 00000094
3000000545: D 0064 foo
31__END_DUMP__
32