ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/t/02_read.t
(Generate patch)

Comparing IO-AIO/t/02_read.t (file contents):
Revision 1.4 by root, Sun Jun 3 09:44:17 2007 UTC vs.
Revision 1.5 by root, Sun Jul 17 17:30:15 2011 UTC

1$| = 1; 1$| = 1;
2 2
3if (-f "/etc/passwd" and -d "/etc") { 3if (-f "AIO.xs" and -d "bin") {
4 print "1..2\n"; 4 print "1..2\n";
5} else { 5} else {
6 print "1..0 # Skipped: unexpected /etc and/or /etc/passwd\n"; 6 print "1..0 # Skipped: unexpected bin and/or AIO.xs\n";
7 exit; 7 exit;
8} 8}
9
10# relies on /etc/passwd to exist...
11 9
12use Fcntl; 10use Fcntl;
13use IO::AIO; 11use IO::AIO;
14 12
15IO::AIO::min_parallel 2; 13IO::AIO::min_parallel 2;
21 } 19 }
22} 20}
23 21
24my $pwd; 22my $pwd;
25 23
26aio_open "/etc/passwd", O_RDONLY, 0, sub { 24aio_open "AIO.xs", O_RDONLY, 0, sub {
27 print $_[0] ? "ok" : "not ok", " 1\n"; 25 print $_[0] ? "ok" : "not ok", " 1\n";
28 $pwd = $_[0]; 26 $pwd = $_[0];
29}; 27};
30 28
31pcb; 29pcb;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines