Commit | Line | Data |
---|---|---|
fa367bcb AC |
1 | BEGIN { |
2 | chdir 't' if -d 't'; | |
3 | @INC = '../lib' if -d '../lib' && -d '../ext'; | |
4 | ||
5 | require "./test.pl"; | |
6 | require Config; import Config; | |
7 | } | |
8 | ||
0b1b7115 JH |
9 | use strict; |
10 | use warnings; | |
11 | ||
fa367bcb AC |
12 | skip_all('no SysV semaphores on this platform') if !$Config{d_sem}; |
13 | ||
14 | my @warnings; | |
15 | { | |
16 | local $SIG{__WARN__} = sub { push @warnings, $_[0] }; | |
55228cce | 17 | local $SIG{SYS} = sub { skip_all("SIGSYS caught") } if exists $SIG{SYS}; |
fa367bcb AC |
18 | my $test = (semctl(-1,0,0,0))[0]; |
19 | ok(!defined $test, "erroneous semctl list slice yields undef"); | |
20 | } | |
21 | ||
22 | is(scalar @warnings, 0, "no warnings from erroneous semctl list slice") | |
23 | or diag("warnings found: @warnings"); | |
24 | ||
25 | done_testing; |