Fix bug whereby length on a tied scalar that returned a UTF-8 value
[p5sagit/p5-mst-13.2.git] / t / lib / warnings / mg
CommitLineData
599cee73 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
0453d815 9 Mandatory Warnings TODO
10 ------------------
11 Can't break at that line [magic_setdbline]
599cee73 12
13__END__
14# mg.c
4438c4b7 15use warnings 'signal' ;
599cee73 16$SIG{FRED} = sub {};
17EXPECT
18No such signal: SIGFRED at - line 3.
19########
20# mg.c
4438c4b7 21no warnings 'signal' ;
0453d815 22$SIG{FRED} = sub {};
23EXPECT
24
25########
26# mg.c
4438c4b7 27use warnings 'signal' ;
e69a2255 28if ($^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'VMS' || $^O eq 'MacOS') {
3eeba6fb 29 print "SKIPPED\n# $^O, can't kill() to raise()\n"; exit;
dfe13c55 30}
d008e5eb 31$|=1;
599cee73 32$SIG{"INT"} = "fred"; kill "INT",$$;
33EXPECT
34SIGINT handler "fred" not defined.
0453d815 35########
36# mg.c
4438c4b7 37no warnings 'signal' ;
e69a2255 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;
0453d815 40}
41$|=1;
42$SIG{"INT"} = "fred"; kill "INT",$$;
43EXPECT
44
b6f8df71 45########
46# mg.c
47use warnings 'uninitialized';
0e7ca5c9 48'foo' =~ /(foo)/;
b6f8df71 49length $3;
50EXPECT
29489e7c 51Use of uninitialized value $3 in length at - line 4.
0e7ca5c9 52########
53# mg.c
54use warnings 'uninitialized';
55length $3;
56EXPECT
29489e7c 57Use of uninitialized value $3 in length at - line 3.
9ae3433d 58########
59# mg.c
60use warnings 'uninitialized';
61$ENV{FOO} = undef; # should not warn
62EXPECT