use Test::More tests => 6;
use Test::Exception;
use File::Temp qw( tempfile tempdir );
+use Fcntl qw( :flock );
use_ok( 'DBM::Deep' );
my $dir = tempdir( CLEANUP => 1 );
my ($fh, $filename) = tempfile( 'tmpXXXX', UNLINK => 1, DIR => $dir );
+flock $fh, LOCK_UN;
##
# test a corrupted file
{
my ($fh, $filename) = tempfile( 'tmpXXXX', UNLINK => 1, DIR => $dir );
+ flock $fh, LOCK_UN;
my %hash;
tie %hash, 'DBM::Deep', $filename;
undef %hash;
{
my ($fh, $filename) = tempfile( 'tmpXXXX', UNLINK => 1, DIR => $dir );
+ flock $fh, LOCK_UN;
my @array;
tie @array, 'DBM::Deep', $filename;
undef @array;