3 # $Id: lock.t,v 1.0.1.2 2000/10/23 18:03:07 ram Exp ram $
8 # Revision 1.0.1.2 2000/10/23 18:03:07 ram
9 # patch4: protected calls to flock() for dos platform
11 # Revision 1.0.1.1 2000/09/28 21:44:06 ram
18 if ($Config{'osname'} eq 'dos') {
19 print "1..0 # Skip: fcntl/flock emulation broken on this platform\n";
27 require Config; import Config;
28 if ($Config{'extensions'} !~ /\bStorable\b/) {
29 print "1..0 # Skip: Storable was not built\n";
32 if (!$Config{'d_flock'} && !$Config{'d_fcntl'} && !$Config{'d_lockf'}) {
33 print "1..0 # Skip: no flock or flock emulation on this platform\n";
36 require 'lib/st-dump.pl';
41 use Storable qw(lock_store lock_retrieve);
45 @a = ('first', undef, 3, -4, -3.14159, 456, 4.5);
48 # We're just ensuring things work, we're not validating locking.
51 ok 1, defined lock_store(\@a, 'store');
52 ok 2, $dumped = &dump(\@a);
54 $root = lock_retrieve('store');
55 ok 3, ref $root eq 'ARRAY';
57 ok 5, &dump($root) eq $dumped;