X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F07_locking.t;h=09e3c8d1012b452bf01be2286a69f65bdc2327bb;hb=7a960a129d8c03a7bc83325f2f8be78a0881d034;hp=58ea83fbeb5a694b47da820c679b6a92bededb7d;hpb=bd7739133ff85e9bd7c1dd8fdda402c5c2ff839a;p=dbsrgits%2FDBM-Deep.git diff --git a/t/07_locking.t b/t/07_locking.t index 58ea83f..09e3c8d 100644 --- a/t/07_locking.t +++ b/t/07_locking.t @@ -2,21 +2,16 @@ # DBM::Deep Test ## use strict; -use Test::More tests => 3; +use Test::More tests => 4; +use t::common qw( new_fh ); use_ok( 'DBM::Deep' ); -## -# basic file open -## -unlink "t/test.db"; +my ($fh, $filename) = new_fh(); my $db = DBM::Deep->new( - file => "t/test.db", - locking => 1 + file => $filename, + locking => 1, ); -if ($db->error()) { - die "ERROR: " . $db->error(); -} ## # basic put/get @@ -24,6 +19,9 @@ if ($db->error()) { $db->{key1} = "value1"; is( $db->{key1}, "value1", "key1 is set" ); +$db->{key2} = [ 1 .. 3 ]; +is( $db->{key2}[1], 2 ); + ## # explicit lock ##