1) forgot to add some t/5* tests to the MANIFEST 2) The one line patch to Engine...
[dbsrgits/DBM-Deep.git] / t / 01_basic.t
index 8d3bff0..4b9208e 100644 (file)
@@ -2,7 +2,9 @@
 # DBM::Deep Test
 ##
 use strict;
-use Test::More tests => 3;
+use Test::More tests => 4;
+
+use t::common qw( new_fh );
 
 diag "Testing DBM::Deep against Perl $] located at $^X";
 
@@ -11,12 +13,18 @@ use_ok( 'DBM::Deep' );
 ##
 # basic file open
 ##
-unlink "t/test.db";
-my $db = eval { DBM::Deep->new( "t/test.db" ) };
+my ($fh, $filename) = new_fh();
+my $db = eval {
+    local $SIG{__DIE__};
+    DBM::Deep->new( $filename );
+};
 if ( $@ ) {
        diag "ERROR: $@";
-    Test::More->builder->BAIL_OUT( "Opening a new file fails" );
+    Test::More->builder->BAIL_OUT( "Opening a new file fails." );
 }
 
 isa_ok( $db, 'DBM::Deep' );
 ok(1, "We can successfully open a file!" );
+
+$db->{foo} = 'bar';
+is( $db->{foo}, 'bar' );