|
|
1 | BEGIN { |
|
|
2 | if ($^O =~ /mswin32/i) { |
|
|
3 | print <<EOF; |
|
|
4 | 1..0 # Perl binary broken, skipping test. Upgrading to a working perl is advised. |
|
|
5 | EOF |
|
|
6 | exit 0; |
|
|
7 | } |
|
|
8 | } |
|
|
9 | |
1 | BEGIN { $| = 1; print "1..5\n"; } |
10 | BEGIN { $| = 1; print "1..5\n"; } |
2 | |
11 | |
3 | use Coro; |
12 | use Coro; |
4 | |
13 | |
5 | print "ok 1\n"; |
14 | print "ok 1\n"; |
… | |
… | |
11 | close STDERR; |
20 | close STDERR; |
12 | close STDOUT; |
21 | close STDOUT; |
13 | $old_idle->(); |
22 | $old_idle->(); |
14 | }; |
23 | }; |
15 | schedule; |
24 | schedule; |
16 | exit(253); |
25 | exit 3; |
17 | }; |
26 | }; |
18 | |
27 | |
|
|
28 | waitpid $pid, 0; |
19 | print |
29 | print |
20 | 253 == (waitpid $pid, 0) >> 8 |
30 | 3 == $? >> 8 |
21 | ? "not " : "", "ok 3\n"; |
31 | ? "not " : "", "ok 3\n"; |
22 | |
32 | |
23 | my $coro = new Coro sub { |
33 | my $coro = new Coro sub { |
24 | print "ok 5\n"; |
34 | print "ok 5\n"; |
25 | Coro::State::_exit 0; |
35 | Coro::State::_exit 0; |