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

Comparing IO-AIO/t/04_fork.t (file contents):
Revision 1.1 by root, Tue Aug 16 22:22:18 2005 UTC vs.
Revision 1.10 by root, Mon Jul 18 02:59:59 2011 UTC

1#!/usr/bin/perl 1#!/usr/bin/perl
2
3BEGIN {
4 if ($^O eq "MSWin32") {
5 print qq{1..0 # SKIP perl broken beyond repair\n};
6 exit 0;
7 }
8}
2 9
3use Test; 10use Test;
4use IO::AIO; 11use IO::AIO;
5 12
6# this is a lame test, but.... 13# this is a lame test, but....
7 14
8BEGIN { plan tests => 9 } 15BEGIN { plan tests => 10 }
9 16
10IO::AIO::min_parallel 2; 17IO::AIO::min_parallel 2;
11 18
19IO::AIO::aio_nop sub {
20 print "ok 6\n";
21};
22
23IO::AIO::aio_busy 1, sub {
24 print "ok 8\n";
25
26};
27
12print "ok 1\n"; 28print "ok 1\n";
13
14aio_stat "/", sub {
15 print "ok 2\n"; # pre-fork
16};
17 29
18if (open FH, "-|") { 30if (open FH, "-|") {
19 print while <FH>; 31 print while <FH>;
20 aio_stat "/", sub { 32 aio_stat "/", sub {
21 print "ok 7\n"; 33 print "ok 7\n";
22 }; 34 };
23 print "ok 6\n"; 35 print "ok 5\n";
24 IO::AIO::poll; 36 IO::AIO::poll while IO::AIO::nreqs;
25 print "ok 8\n"; 37 print "ok 9\n";
26} else { 38} else {
39 IO::AIO::reinit;
27 print "ok 3\n"; 40 print "ok 2\n";
28 aio_stat "/", sub { 41 aio_stat "/", sub {
29 print "ok 4\n"; 42 print "ok 3\n";
30 }; 43 };
31 IO::AIO::poll; 44 IO::AIO::poll while IO::AIO::nreqs;
32 print "ok 5\n"; 45 print "ok 4\n";
33 exit; 46 exit;
34} 47}
35 48
36print "ok 9\n"; 49print "ok 10\n";
37 50

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines