Suppress a few compilation warnings in pp_hot.c.
[p5sagit/p5-mst-13.2.git] / t / op / die.t
CommitLineData
38b8243a 1#!./perl
2
05423cc9 3print "1..10\n";
38b8243a 4
5$SIG{__DIE__} = sub { print ref($_[0]) ? ("ok ",$_[0]->[0]++,"\n") : @_ } ;
6
06bf62c7 7$err = "#[\000]\nok 1\n";
38b8243a 8eval {
9 die $err;
10};
11
12print "not " unless $@ eq $err;
13print "ok 2\n";
14
15$x = [3];
16eval { die $x; };
17
18print "not " unless $x->[0] == 4;
19print "ok 4\n";
20
21eval {
22 eval {
23 die [ 5 ];
24 };
25 die if $@;
26};
05423cc9 27
28eval {
29 eval {
30 die bless [ 7 ], "Error";
31 };
32 die if $@;
33};
34
35print "not " unless ref($@) eq "Out";
36print "ok 10\n";
37
38package Error;
39
40sub PROPAGATE {
41 print "ok ",$_[0]->[0]++,"\n";
42 bless [$_[0]->[0]], "Out";
43}