More failing tests, particularly for keys() and transactions.
[dbsrgits/DBM-Deep.git] / t / 03_bighash.t
CommitLineData
ffed8b01 1##
2# DBM::Deep Test
3##
4use strict;
a4e2db58 5use Test::More tests => 2;
fde3db1a 6use t::common qw( new_fh );
ffed8b01 7
8use_ok( 'DBM::Deep' );
9
fde3db1a 10my ($fh, $filename) = new_fh();
ffed8b01 11my $db = DBM::Deep->new(
2a81bf9e 12 file => $filename,
ffed8b01 13 type => DBM::Deep->TYPE_HASH
14);
ffed8b01 15
16##
17# put/get many keys
18##
a4e2db58 19my $max_keys = 4000;
20
ffed8b01 21for ( 0 .. $max_keys ) {
22 $db->put( "hello $_" => "there " . $_ * 2 );
23}
24
30029562 25my $count = -1;
ffed8b01 26for ( 0 .. $max_keys ) {
30029562 27 $count = $_;
28 unless ( $db->get( "hello $_" ) eq "there " . $_ * 2 ) {
29 last;
30 };
ffed8b01 31}
30029562 32is( $count, $max_keys, "We read $count keys" );