Revision: | 1.4 |
Committed: | Sun Jul 26 12:41:04 2009 UTC (15 years, 4 months ago) by root |
Content type: | application/x-troff |
Branch: | MAIN |
CVS Tags: | rel-5_28, rel-5_29, rel-5_21, rel-5_22, rel-5_23, rel-5_24, rel-5_26, rel-5_27, rel-5_1, rel-5_0, rel-5_3, rel-5_2, rel-5_261, rel-5_201, rel-5_202, rel-5_11, rel-5_12, rel-4_881, rel-5_31, rel-4_88, rel-5_01, rel-5_111, rel-5_112, rel-5_271, rel-5_251, rel-4_91, rel-4_9 |
Changes since 1.3: | +9 -0 lines |
Log Message: | strawberry perl... |
# | Content |
---|---|
1 | BEGIN { |
2 | unless (exists $SIG{USR1}) { |
3 | print <<EOF; |
4 | 1..0 # SKIP Broken perl detected, skipping tests. |
5 | EOF |
6 | exit 0; |
7 | } |
8 | } |
9 | |
10 | use AnyEvent; |
11 | BEGIN { eval q{use AnyEvent::Impl::EventLib;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::EventLib not loadable}), exit 0) } |
12 | |
13 | $| = 1; print "1..5\n"; |
14 | |
15 | print "ok 1\n"; |
16 | |
17 | my $cv = AnyEvent->condvar; |
18 | |
19 | my $error = AnyEvent->timer (after => 5, cb => sub { |
20 | print <<EOF; |
21 | Bail out! No signal caught. |
22 | EOF |
23 | exit 0; |
24 | }); |
25 | |
26 | my $sw = AnyEvent->signal (signal => 'INT', cb => sub { |
27 | print "ok 3\n"; |
28 | $cv->broadcast; |
29 | }); |
30 | |
31 | print "ok 2\n"; |
32 | kill 'INT', $$; |
33 | $cv->wait; |
34 | undef $error; |
35 | |
36 | print "ok 4\n"; |
37 | |
38 | undef $sw; |
39 | |
40 | print "ok 5\n"; |
41 |