7 plan skip_all => "You must set \$ENV{LONG_TESTS} to run the long tests"
8 unless $ENV{LONG_TESTS};
11 use t::common qw( new_fh );
13 use_ok( 'DBM::Deep' );
15 diag "This test can take up to a minute to run. Please be patient.";
17 my ($fh, $filename) = new_fh();
18 my $db = DBM::Deep->new(
20 type => DBM::Deep->TYPE_ARRAY,
28 for ( 0 .. $max_keys ) {
29 $db->put( $_ => $_ * 2 );
33 for ( 0 .. $max_keys ) {
35 unless ( $db->get( $_ ) == $_ * 2 ) {
39 is( $count, $max_keys, "We read $count keys" );
41 cmp_ok( scalar(@$db), '==', $max_keys + 1, "Number of elements is correct" );
43 cmp_ok( scalar(@$db), '==', 0, "Number of elements after clear() is correct" );