3 # $Id: lock.t,v 1.0.1.1 2000/09/28 21:44:06 ram Exp $
8 # Revision 1.0.1.1 2000/09/28 21:44:06 ram
17 require Config; import Config;
18 if ($Config{'extensions'} !~ /\bStorable\b/) {
19 print "1..0 # Skip: Storable was not built\n";
22 if (!$Config{'d_flock'} && !$Config{'d_fcntl'} && !$Config{'d_lockf'}) {
23 print "1..0 # Skip: no flock or flock emulation on this platform\n";
26 if ($Config{'osname'} eq 'dos') {
27 print "1..0 # Skip: fcntl/flock emulation broken on this platform\n";
30 require 'lib/st-dump.pl';
35 use Storable qw(lock_store lock_retrieve);
39 @a = ('first', undef, 3, -4, -3.14159, 456, 4.5);
42 # We're just ensuring things work, we're not validating locking.
45 ok 1, defined lock_store(\@a, 'store');
46 ok 2, $dumped = &dump(\@a);
48 $root = lock_retrieve('store');
49 ok 3, ref $root eq 'ARRAY';
51 ok 5, &dump($root) eq $dumped;