ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/t/13_diewarn.t
(Generate patch)

Comparing Coro/t/13_diewarn.t (file contents):
Revision 1.1 by root, Sun Oct 7 15:08:23 2007 UTC vs.
Revision 1.4 by root, Sun Oct 14 19:34:09 2007 UTC

1BEGIN { $| = 1; print "1..5\n"; } 1BEGIN { $| = 1; print "1..7\n"; }
2 2
3use Coro; 3use Coro;
4use Coro::State;
4 5
5print "ok 1\n"; 6print "ok 1\n";
6 7
7async { 8async {
9 warn "-";
10 cede;
11 warn "-";
12
8 local $SIG{__WARN__} = sub { print "ok 4\n" }; 13 local $SIG{__WARN__} = sub { print "ok 7\n" };
9 { 14 {
10 local $SIG{__WARN__} = sub { print "ok 2\n" }; 15 local $SIG{__WARN__} = sub { print "ok 5\n" };
11 cede; 16 cede;
12 warn; 17 warn "-";
13 } 18 }
14 cede; 19 cede;
15 warn; 20 warn "-";
21 cede;
16}; 22};
17 23
18async { 24async {
25 $Coro::State::WARNHOOK = sub { print "ok 3\n" };
26
19 local $SIG{__WARN__} = sub { print "ok 5\n" }; 27 local $SIG{__WARN__} = sub { print "ok 6\n" };
20 { 28 {
21 local $SIG{__WARN__} = sub { print "ok 3\n" }; 29 local $SIG{__WARN__} = sub { print "ok 4\n" };
22 cede; 30 cede;
23 warn; 31 warn "-";
24 } 32 }
25 cede; 33 cede;
26 warn; 34 warn "-";
27}; 35};
36
37$Coro::State::WARNHOOK = sub { print "ok 2\n" };
28 38
29cede; 39cede;
30cede; 40cede;
31cede; 41cede;
32cede; 42cede;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines