ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/t/03_keepalive.t
Revision: 1.4
Committed: Thu Oct 21 15:13:42 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: +3 -3 lines
Log Message:
port testsuite

File Contents

# User Rev Content
1 root 1.2 BEGIN {
2     if (exists $ENV{AUTOMATED_TESTING}) {
3     print "1..0 # Skipped: Too many broken cpan tester setups.\n";
4     exit;
5     }
6     }
7    
8     BEGIN { $| = 1; print "1..8\n"; }
9 root 1.1
10     no warnings;
11     use strict;
12    
13     use EV;
14    
15 root 1.2 my $timer = EV::timer_ns 1, 0.3, sub { print "ok 7\n"; $_[0]->stop };
16 root 1.1
17     $timer->keepalive (1);
18    
19     print "ok 1\n";
20 root 1.4 EV::run;
21 root 1.1 print "ok 2\n";
22    
23     $timer->start;
24    
25     $timer->keepalive (0);
26    
27     $timer->again;
28     $timer->stop;
29     $timer->start;
30    
31 root 1.3 my $timer2 = EV::timer -1, 0, sub { print "ok 4\n" };
32 root 1.2 $timer2->keepalive (0);
33    
34 root 1.1 print "ok 3\n";
35 root 1.4 EV::run;
36 root 1.2 print "ok 5\n";
37 root 1.1
38     $timer->keepalive (1);
39    
40 root 1.2 print "ok 6\n";
41 root 1.4 EV::run;
42 root 1.2 print "ok 8\n";
43 root 1.1