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.3 by root, Sat Oct 13 23:19:10 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 "-";
16 cede; 21 cede;
17}; 22};
18 23
19async { 24async {
25 $Coro::State::WARNHOOK = sub { print "ok 3\n" };
26
20 local $SIG{__WARN__} = sub { print "ok 5\n" }; 27 local $SIG{__WARN__} = sub { print "ok 6\n" };
21 { 28 {
22 local $SIG{__WARN__} = sub { print "ok 3\n" }; 29 local $SIG{__WARN__} = sub { print "ok 4\n" };
23 cede; 30 cede;
24 warn "-"; 31 warn "-";
25 } 32 }
26 cede; 33 cede;
27 warn "-"; 34 warn "-";
28}; 35};
29 36
37$Coro::State::WARNHOOK = sub { print "ok 2\n" };
38
30cede; 39cede;
31cede; 40cede;
32cede; 41cede;
33cede; 42cede;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines