ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/t/09_brandon.t
Revision: 1.4
Committed: Wed Apr 15 17:49:27 2009 UTC (15 years, 2 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-3_7, rel-3_6, rel-3_8
Changes since 1.3: +10 -10 lines
Log Message:
keepalive fix

File Contents

# User Rev Content
1 root 1.3 BEGIN {
2     if (exists $ENV{AUTOMATED_TESTING}) {
3     print "1..0 # Skipped: Too many broken cpan tester setups.\n";
4     exit;
5     }
6     }
7 root 1.1 BEGIN { $| = 1; print "1..12\n"; }
8    
9     # a surprisingly effective test by brandon black
10    
11     no warnings;
12     use strict;
13    
14     use EV;
15    
16     {
17 root 1.4 my $a = EV::timer 0.6, 0, sub { print "not ok 2\n"; EV::unloop };
18     my $b = EV::timer 0.3, 0, sub { print "ok 2\n"; EV::unloop };
19 root 1.1
20     print "ok 1\n";
21     EV::loop;
22     print "ok 3\n";
23     }
24    
25     {
26 root 1.4 my $b = EV::timer 0.3, 0, sub { print "ok 5\n"; EV::unloop };
27     my $a = EV::timer 0.6, 0, sub { print "not ok 5\n"; EV::unloop };
28 root 1.1
29     print "ok 4\n";
30     EV::loop;
31     print "ok 6\n";
32     }
33    
34     {
35 root 1.4 my $a = EV::timer 0.9, 0, sub { print "not ok 8\n"; EV::unloop };
36     my $b = EV::timer 0.6, 0, sub { print "not ok 8\n"; EV::unloop };
37     my $c = EV::timer 0.3, 0, sub { print "ok 8\n"; EV::unloop };
38 root 1.1
39     print "ok 7\n";
40     EV::loop;
41     print "ok 9\n";
42     }
43     {
44    
45 root 1.4 my $a = EV::timer 0.6, 0, sub { print "not ok 11\n"; EV::unloop };
46     my $b = EV::timer 0.3, 0, sub { print "ok 11\n"; EV::unloop };
47     my $c = EV::timer 0.9, 0, sub { print "not ok 11\n"; EV::unloop };
48 root 1.1
49     print "ok 10\n";
50     EV::loop;
51     print "ok 12\n";
52     }