3 # $Id: lock.t,v 1.0.1.3 2000/10/26 17:11:27 ram Exp ram $
8 # Revision 1.0.1.3 2000/10/26 17:11:27 ram
9 # patch5: just check $^O, there's no need for the whole Config
11 # Revision 1.0.1.2 2000/10/23 18:03:07 ram
12 # patch4: protected calls to flock() for dos platform
14 # Revision 1.0.1.1 2000/09/28 21:44:06 ram
23 require Config; import Config;
24 if ($Config{'extensions'} !~ /\bStorable\b/) {
25 print "1..0 # Skip: Storable was not built\n";
28 if (!$Config{'d_flock'} &&
29 !$Config{'d_fcntl_can_lock'} &&
30 !$Config{'d_lockf'}) {
31 print "1..0 # Skip: no flock or flock emulation on this platform\n";
35 print "1..0 # Skip: fcntl/flock emulation broken on this platform\n";
38 require 'lib/st-dump.pl';
43 use Storable qw(lock_store lock_retrieve);
47 @a = ('first', undef, 3, -4, -3.14159, 456, 4.5);
50 # We're just ensuring things work, we're not validating locking.
53 ok 1, defined lock_store(\@a, 'store');
54 ok 2, $dumped = &dump(\@a);
56 $root = lock_retrieve('store');
57 ok 3, ref $root eq 'ARRAY';
59 ok 5, &dump($root) eq $dumped;