File: basic.t

package info (click to toggle)
liblockfile-simple-perl 0.208-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 200 kB
  • sloc: perl: 538; makefile: 2; ansic: 1
file content (31 lines) | stat: -rw-r--r-- 498 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!./perl

# $Id: basic.t,v 0.2 1999/12/07 20:51:05 ram Exp ram $
#
#  @COPYRIGHT@
#
# $Log: basic.t,v $
# Revision 0.2  1999/12/07 20:51:05  ram
# Baseline for 0.2 release.
#

use LockFile::Simple qw(lock trylock unlock);

print "1..5\n";

unlink 't.lock';
print "not " unless lock('t');
print "ok 1\n";

print "not " unless -r 't.lock';
print "ok 2\n";

print "not " if trylock('t');
print "ok 3\n";

print "not " unless unlock('t');
print "ok 4\n";

print "not " if -f 't.lock';
print "ok 5\n";