xref: /openbsd/gnu/usr.bin/perl/t/lib/warnings/mg (revision 7b36286a)
1  mg.c	AOK
2
3  No such signal: SIG%s
4    $SIG{FRED} = sub {}
5
6  SIG%s handler \"%s\" not defined.
7    $SIG{"INT"} = "ok3"; kill "INT",$$;
8
9  Mandatory Warnings TODO
10  ------------------
11  Can't break at that line	[magic_setdbline]
12
13__END__
14# mg.c
15use warnings 'signal' ;
16$SIG{FRED} = sub {};
17EXPECT
18No such signal: SIGFRED at - line 3.
19########
20# mg.c
21no warnings 'signal' ;
22$SIG{FRED} = sub {};
23EXPECT
24
25########
26# mg.c
27use warnings 'signal' ;
28if ($^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'VMS' || $^O eq 'MacOS') {
29    print "SKIPPED\n# $^O, can't kill() to raise()\n"; exit;
30}
31$|=1;
32$SIG{"INT"} = "fred"; kill "INT",$$;
33EXPECT
34SIGINT handler "fred" not defined.
35########
36# mg.c
37no warnings 'signal' ;
38if ($^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'VMS' || $^O eq 'MacOS') {
39    print "SKIPPED\n# $^O, can't kill() to raise()\n"; exit;
40}
41$|=1;
42$SIG{"INT"} = "fred"; kill "INT",$$;
43EXPECT
44
45########
46# mg.c
47use warnings 'uninitialized';
48'foo' =~ /(foo)/;
49length $3;
50EXPECT
51Use of uninitialized value in length at - line 4.
52########
53# mg.c
54use warnings 'uninitialized';
55length $3;
56EXPECT
57Use of uninitialized value in length at - line 3.
58