An updated EBCDIC tr patch.
[p5sagit/p5-mst-13.2.git] / t / lib / st-lock.t
CommitLineData
dd19458b 1#!./perl
2
3# $Id: lock.t,v 1.0.1.1 2000/09/28 21:44:06 ram Exp $
4#
5# @COPYRIGHT@
6#
7# $Log: lock.t,v $
8# Revision 1.0.1.1 2000/09/28 21:44:06 ram
9# patch2: created.
10#
11#
12
13sub BEGIN {
14 chdir('t') if -d 't';
15 @INC = '.';
16 push @INC, '../lib';
17 require Config; import Config;
18 if ($Config{'extensions'} !~ /\bStorable\b/) {
19 print "1..0 # Skip: Storable was not built\n";
20 exit 0;
21 }
22 require 'lib/st-dump.pl';
23}
24
25sub ok;
26
27use Storable qw(lock_store lock_retrieve);
28
29print "1..5\n";
30
31@a = ('first', undef, 3, -4, -3.14159, 456, 4.5);
32
33#
34# We're just ensuring things work, we're not validating locking.
35#
36
37ok 1, defined lock_store(\@a, 'store');
38ok 2, $dumped = &dump(\@a);
39
40$root = lock_retrieve('store');
41ok 3, ref $root eq 'ARRAY';
42ok 4, @a == @$root;
43ok 5, &dump($root) eq $dumped;
44
45unlink 't/store';
46