# DBM::Deep Test
##
use strict;
-use Test::More tests => 2;
+use Test::More tests => 4;
use t::common qw( new_fh );
use_ok( 'DBM::Deep' );
};
}
is( $count, $max_keys, "We read $count keys" );
+
+cmp_ok( scalar(keys %$db), '==', $max_keys + 1, "Number of keys is correct" );
+$db->clear;
+cmp_ok( scalar(keys %$db), '==', 0, "Number of keys after clear() is correct" );
# DBM::Deep Test
##
use strict;
-use Test::More tests => 2;
+use Test::More tests => 4;
use t::common qw( new_fh );
use_ok( 'DBM::Deep' );
};
}
is( $count, $max_keys, "We read $count keys" );
+
+cmp_ok( scalar(@$db), '==', $max_keys + 1, "Number of elements is correct" );
+$db->clear;
+cmp_ok( scalar(@$db), '==', 0, "Number of elements after clear() is correct" );