This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make cmp() work on EBCDIC with both UTF-8 operands
[perl5.git] / t / io / semctl.t
CommitLineData
fa367bcb
AC
1BEGIN {
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
9use strict;
10use warnings;
11
fa367bcb
AC
12skip_all('no SysV semaphores on this platform') if !$Config{d_sem};
13
14my @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
22is(scalar @warnings, 0, "no warnings from erroneous semctl list slice")
23 or diag("warnings found: @warnings");
24
25done_testing;