ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/t/02_once.t
Revision: 1.9
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
Changes since 1.8: +2 -2 lines
Log Message:
keepalive fix

File Contents

# User Rev Content
1 root 1.8 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 root 1.2 BEGIN { $| = 1; print "1..6\n"; }
9 root 1.1
10     no warnings;
11     use strict;
12 root 1.3 use Socket;
13 root 1.1
14     use EV;
15    
16 root 1.2 for my $i (3..5) {
17 root 1.9 EV::once undef, 0, ($i - 3) * 0.3 + 0.6, sub {
18 root 1.1 print $_[0] == EV::TIMEOUT ? "" : "not ", "ok $i\n";
19     };
20     }
21    
22 root 1.3 socketpair my $s1, my $s2, AF_UNIX, SOCK_STREAM, PF_UNSPEC;
23    
24 root 1.9 EV::once $s1, EV::WRITE, 0.3, sub {
25 root 1.4 print $_[0] & EV::WRITE ? "" : "not ", "ok 2\n";
26 root 1.1 };
27    
28 root 1.2 print "ok 1\n";
29 root 1.1 EV::loop;
30 root 1.2 print "ok 6\n";