r589@rob-kinyons-computer-2 (orig r10513): rkinyon | 2008-01-10 23:43:55 -0500
[dbsrgits/DBM-Deep.git] / t / 97_dump_file.t
CommitLineData
4c76b4dd 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" );
14NumTxns: 1
15Chains(B):
16Chains(D):
17Chains(I):
1800000030: H 0064 REF: 1
19__END_DUMP__
20
21$db->{foo} = 'bar';
22
23is( $db->_dump_file, <<"__END_DUMP__", "Dump of initial file correct" );
24NumTxns: 1
25Chains(B):
26Chains(D):
27Chains(I):
2800000030: H 0064 REF: 1
2900000094: D 0064 bar
3000000158: B 0387
31 00000545 00000094
3200000545: D 0064 foo
33__END_DUMP__
34