1 # Before `make install' is performed this script should be runnable with
2 # `make test'. After `make install' it should work as `perl IPC-Semaphore-Concurrency.t'
4 #########################
6 # change 'tests => 1' to 'tests => last_test_to_print';
8 use Test::More tests => 3;
9 BEGIN { use_ok('IPC::Semaphore::Concurrency') };
11 #########################
13 # Insert your test code below, the Test::More module is use()ed here so read
14 # its man page ( perldoc Test::More ) for help writing this test script.
16 system('rm -rf /tmp/.IPC::Semaphore::Concurrency.test*');
18 # Simple semaphore usage
19 my $c = IPC::Semaphore::Concurrency->new('/tmp/.IPC::Semaphore::Concurrency.test1.$$');
20 ok(defined($c), "Simple usage");
22 # Full semaphore usage
23 $c = IPC::Semaphore::Concurrency->new(
24 path => '/tmp/.IPC::Semaphore::Concurrency.test2.$$',
30 ok(defined($c), "Full usage");
33 system('rm -rf /tmp/.IPC::Semaphore::Concurrency.test*');