+use 5.006_000;
use strict;
-use Test;
-use DBM::Deep;
-use t::common qw( new_fh );
+use warnings FATAL => 'all';
-my ($fh, $filename) = new_fh();
-my $db = DBM::Deep->new( file => $filename, fh => $fh, );
+use Test::More;
+
+use t::common qw( new_fh );
my $max = 10;
-plan tests => $max;
+plan tests => $max + 1;
+
+use_ok( 'DBM::Deep' );
+
+my ($fh, $filename) = new_fh();
+my $db = DBM::Deep->new( $filename );
-my $x = 0;
-while( $x < $max ) {
+my $x = 1;
+while( $x <= $max ) {
eval {
delete $db->{borked}{test};
$db->{borked}{test} = 1;
};
- ok($@, '');
+ ok(!$@, "No eval failure after ${x}th iteration");
$x++;
}