Revision: | 1.4 |
Committed: | Thu Oct 21 15:13:43 2010 UTC (13 years, 8 months ago) by root |
Content type: | application/x-troff |
Branch: | MAIN |
CVS Tags: | EV-rel-4_28, EV-rel-4_29, EV-rel-4_26, EV-rel-4_27, EV-rel-4_25, EV-rel-4_22, EV-rel-4_20, EV-rel-4_21, rel-4_01, rel-4_00, rel-4_03, rel-4_02, EV-rel-4_31, EV-rel-4_30, EV-rel-4_33, EV-rel-4_32, EV-rel-4_34, EV_rel-4_11, EV_rel-4_10, EV-rel-4_15, EV_rel-4_17, EV_rel-4_16, EV-rel-4_18, HEAD |
Changes since 1.3: | +4 -4 lines |
Log Message: | port testsuite |
# | User | Rev | Content |
---|---|---|---|
1 | root | 1.3 | BEGIN { $| = 1; print "1..13\n"; } |
2 | root | 1.1 | |
3 | no warnings; | ||
4 | use strict; | ||
5 | |||
6 | use EV; | ||
7 | |||
8 | root | 1.2 | { |
9 | my ($a1, $a2, $a3); | ||
10 | root | 1.1 | |
11 | root | 1.2 | $a3 = EV::async sub { |
12 | print "not ok 1\n"; | ||
13 | }; | ||
14 | $a2 = EV::async sub { | ||
15 | root | 1.3 | print "ok 5\n"; |
16 | root | 1.2 | $a1->cb (sub { |
17 | root | 1.3 | print "ok 6\n"; |
18 | root | 1.4 | EV::break; |
19 | root | 1.2 | }); |
20 | $a1->send; | ||
21 | }; | ||
22 | $a1 = EV::async sub { | ||
23 | root | 1.3 | print $a1->async_pending ? "not " : "", "ok 4\n"; |
24 | root | 1.2 | $a2->send; |
25 | }; | ||
26 | |||
27 | root | 1.3 | print $a1->async_pending ? "not " : "", "ok 1\n"; |
28 | root | 1.2 | $a1->send; |
29 | root | 1.3 | print $a1->async_pending ? "" : "not ", "ok 2\n"; |
30 | root | 1.2 | $a1->send; |
31 | $a1->send; | ||
32 | root | 1.3 | print "ok 3\n"; |
33 | root | 1.4 | EV::run; |
34 | root | 1.3 | print "ok 7\n"; |
35 | root | 1.2 | } |
36 | |||
37 | { | ||
38 | my $l = new EV::Loop; | ||
39 | my ($a1, $a2, $a3); | ||
40 | |||
41 | $a3 = $l->async (sub { | ||
42 | root | 1.3 | print "not ok 8\n"; |
43 | root | 1.1 | }); |
44 | root | 1.2 | $a2 = $l->async (sub { |
45 | root | 1.3 | print "ok 11\n"; |
46 | root | 1.2 | $a1->cb (sub { |
47 | root | 1.3 | print "ok 12\n"; |
48 | root | 1.4 | $l->break; |
49 | root | 1.2 | }); |
50 | $a1->send; | ||
51 | }); | ||
52 | $a1 = $l->async (sub { | ||
53 | root | 1.3 | print "ok 10\n"; |
54 | root | 1.2 | $a2->send; |
55 | }); | ||
56 | |||
57 | root | 1.3 | print "ok 8\n"; |
58 | root | 1.2 | $a1->send; |
59 | $a1->send; | ||
60 | root | 1.1 | $a1->send; |
61 | root | 1.3 | print "ok 9\n"; |
62 | root | 1.4 | $l->run; |
63 | root | 1.3 | print "ok 13\n"; |
64 | root | 1.2 | } |
65 | root | 1.3 |