5 use Test::More tests => 4;
6 use t::common qw( new_fh );
10 my ($fh, $filename) = new_fh();
11 my $db = DBM::Deep->new(
13 type => DBM::Deep->TYPE_HASH
21 for ( 0 .. $max_keys ) {
22 $db->put( "hello $_" => "there " . $_ * 2 );
26 for ( 0 .. $max_keys ) {
28 unless ( $db->get( "hello $_" ) eq "there " . $_ * 2 ) {
32 is( $count, $max_keys, "We read $count keys" );
34 cmp_ok( scalar(keys %$db), '==', $max_keys + 1, "Number of keys is correct" );
36 cmp_ok( scalar(keys %$db), '==', 0, "Number of keys after clear() is correct" );