… | |
… | |
3 | BEGIN { $ENV{PERL_ANYEVENT_LOOP_TESTS} or ((print qq{1..0 # SKIP PERL_ANYEVENT_LOOP_TESTS not true\n}), exit 0) } |
3 | BEGIN { $ENV{PERL_ANYEVENT_LOOP_TESTS} or ((print qq{1..0 # SKIP PERL_ANYEVENT_LOOP_TESTS not true\n}), exit 0) } |
4 | BEGIN { eval q{use AnyEvent::Impl::Cocoa;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::Cocoa not loadable\n}), exit 0) } |
4 | BEGIN { eval q{use AnyEvent::Impl::Cocoa;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::Cocoa not loadable\n}), exit 0) } |
5 | |
5 | |
6 | |
6 | |
7 | |
7 | |
8 | $| = 1; print "1..21\n"; |
8 | $| = 1; print "1..28\n"; |
9 | |
9 | |
10 | print "ok 1\n"; |
10 | print "ok 1\n"; |
11 | |
11 | |
12 | { |
12 | { |
13 | my $cv = AnyEvent->condvar; |
13 | my $cv = AnyEvent->condvar; |
… | |
… | |
72 | print "ok 20\n"; |
72 | print "ok 20\n"; |
73 | $cv->recv; |
73 | $cv->recv; |
74 | print "ok 21\n"; |
74 | print "ok 21\n"; |
75 | } |
75 | } |
76 | |
76 | |
|
|
77 | { |
|
|
78 | my $cv = AE::cv { |
|
|
79 | print +($_[0]->recv)[0] == 6 ? "" : "not ", "ok 27\n"; |
|
|
80 | }; |
|
|
81 | |
|
|
82 | print "ok 22\n"; |
|
|
83 | |
|
|
84 | $cv->begin (sub { |
|
|
85 | print "ok 26\n"; |
|
|
86 | $_[0](6); |
|
|
87 | }); |
|
|
88 | |
|
|
89 | print "ok 23\n"; |
|
|
90 | $cv->begin; |
|
|
91 | print "ok 24\n"; |
|
|
92 | $cv->end; |
|
|
93 | print "ok 25\n"; |
|
|
94 | $cv->end; |
|
|
95 | |
|
|
96 | print "ok 28\n"; |
|
|
97 | } |
|
|
98 | |