First checkin of the reversion back from the failed optimization effort. I will be...
[dbsrgits/DBM-Deep.git] / t / 01_basic.t
1 ##
2 # DBM::Deep Test
3 ##
4 use strict;
5 use Test::More tests => 3;
6
7 use t::common qw( new_fh );
8
9 diag "Testing DBM::Deep against Perl $] located at $^X";
10
11 use_ok( 'DBM::Deep' );
12
13 ##
14 # basic file open
15 ##
16 my ($fh, $filename) = new_fh();
17 my $db = eval {
18     local $SIG{__DIE__};
19     DBM::Deep->new( $filename );
20 };
21 if ( $@ ) {
22         diag "ERROR: $@";
23     Test::More->builder->BAIL_OUT( "Opening a new file fails." );
24 }
25
26 isa_ok( $db, 'DBM::Deep' );
27 ok(1, "We can successfully open a file!" );
28
29 $db->{foo} = 'bar';