~ubuntu-branches/ubuntu/saucy/libapache-session-perl/saucy

« back to all changes in this revision

Viewing changes to t/99semaphore.t

  • Committer: Bazaar Package Importer
  • Author(s): Gunnar Wolf
  • Date: 2007-03-21 11:53:52 UTC
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20070321115352-29o71d4163l36ugw
Tags: upstream-1.82
ImportĀ upstreamĀ versionĀ 1.82

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
use File::Temp qw[tempdir];
5
5
use Cwd qw[getcwd];
6
6
 
7
 
plan skip_all => "Optional modules (IPC::SysV, IPC::Semaphore) not installed"
 
7
BEGIN {
 
8
 plan skip_all => "Optional modules (IPC::SysV, IPC::Semaphore) not installed"
8
9
  unless eval {
9
10
               require IPC::SysV;
10
11
               require IPC::Semaphore;
11
12
              };
12
 
 
13
 
my $origdir = getcwd;
14
 
my $tempdir = tempdir( DIR => '.', CLEANUP => 1 );
15
 
chdir( $tempdir );
 
13
 plan skip_all => "Cygserver is not running"
 
14
  if $^O eq 'cygwin' && (!exists $ENV{'CYGWIN'} || $ENV{'CYGWIN'} !~ /server/i);
 
15
}
16
16
 
17
17
plan tests => 29;
18
18
 
19
19
my $package = 'Apache::Session::Lock::Semaphore';
20
20
use_ok $package;
 
21
 
 
22
#my $origdir = getcwd;
 
23
#my $tempdir = tempdir( DIR => '.', CLEANUP => 1 );
 
24
#chdir( $tempdir );
 
25
 
21
26
use IPC::SysV qw(IPC_CREAT S_IRWXU SEM_UNDO);
22
27
use IPC::Semaphore;
23
28
 
80
85
    $sem->remove;
81
86
}
82
87
 
83
 
chdir( $origdir );
 
88
#chdir( $origdir );