Updated Changes to note when we actually released 0.97
[dbsrgits/DBM-Deep.git] / t / 03_bighash.t
CommitLineData
ffed8b01 1##
2# DBM::Deep Test
3##
4use strict;
5use Test::More;
6
7my $max_keys = 4000;
30029562 8plan tests => 2;
ffed8b01 9
10use_ok( 'DBM::Deep' );
11
12unlink "t/test.db";
13my $db = DBM::Deep->new(
14 file => "t/test.db",
15 type => DBM::Deep->TYPE_HASH
16);
17if ($db->error()) {
18 die "ERROR: " . $db->error();
19}
20
21##
22# put/get many keys
23##
24for ( 0 .. $max_keys ) {
25 $db->put( "hello $_" => "there " . $_ * 2 );
26}
27
30029562 28my $count = -1;
ffed8b01 29for ( 0 .. $max_keys ) {
30029562 30 $count = $_;
31 unless ( $db->get( "hello $_" ) eq "there " . $_ * 2 ) {
32 last;
33 };
ffed8b01 34}
30029562 35is( $count, $max_keys, "We read $count keys" );