summaryrefslogtreecommitdiff
path: root/t/pragma/warn/mg
blob: 7f40ded7f883f071a1f5700361dfaa747399c77f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
  mg.c	AOK

  No such signal: SIG%s
    $SIG{FRED} = sub {}

  SIG%s handler \"%s\" not defined.
    $SIG{"INT"} = "ok3"; kill "INT",$$;

  Mandatory Warnings TODO
  ------------------
  Can't break at that line	[magic_setdbline]

__END__
# mg.c
use warning 'signal' ;
$SIG{FRED} = sub {};
EXPECT
No such signal: SIGFRED at - line 3.
########
# mg.c
no warning 'signal' ;
$SIG{FRED} = sub {};
EXPECT

########
# mg.c
use warning 'signal' ;
if ($^O eq 'MSWin32' || $^O eq 'VMS') {
    print "SKIPPED\n# $^O, can't kill() to raise()\n"; exit;
}
$|=1;
$SIG{"INT"} = "fred"; kill "INT",$$;
EXPECT
SIGINT handler "fred" not defined.
########
# mg.c
no warning 'signal' ;
if ($^O eq 'MSWin32' || $^O eq 'VMS') {
    print "SKIPPED\n# win32, can't kill() to raise()\n"; exit;
}
$|=1;
$SIG{"INT"} = "fred"; kill "INT",$$;
EXPECT