r8204@rob-kinyons-computer-2 (orig r10021): rkinyon | 2007-09-28 20:00:36 -0400
[dbsrgits/DBM-Deep.git] / t / 97_dump_file.t
CommitLineData
4c724433 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" );
1e891469 14NumTxns: 1
4c724433 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" );
1e891469 24NumTxns: 1
4c724433 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