ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/t/65_event_01_basic.t
Revision: 1.5
Committed: Fri Aug 12 18:41:28 2011 UTC (13 years, 3 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-7_0, rel-6_0, rel-6_1, rel-6_14, rel-6_11, rel-6_12, rel-6_13, rel-7_04, rel-7_01, rel-7_02, rel-7_03, rel-6_02, rel-6_01
Changes since 1.4: +5 -2 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 use AnyEvent;
2
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::Event;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::Event not loadable\n}), exit 0) }
5
6
7
8 $| = 1; print "1..6\n";
9
10 print "ok 1\n";
11
12 my $cv = AnyEvent->condvar;
13
14 print "ok 2\n";
15
16 my $timer1 = AnyEvent->timer (after => 0.1, cb => sub { print "ok 5\n"; $cv->broadcast });
17
18 print "ok 3\n";
19
20 AnyEvent->timer (after => 0.01, cb => sub { print "not ok 5\n" });
21
22 print "ok 4\n";
23
24 $cv->wait;
25
26 print "ok 6\n";
27