ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/t/04_fork.t
Revision: 1.5
Committed: Tue Feb 15 03:15:16 2011 UTC (13 years, 4 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-3_9, rel-3_8
Changes since 1.4: +9 -4 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 #!/usr/bin/perl
2
3 use Test;
4 use IO::AIO;
5
6 # this is a lame test, but....
7
8 BEGIN { plan tests => 10 }
9
10 IO::AIO::min_parallel 2;
11
12 IO::AIO::aio_nop sub {
13 print "ok 6\n";
14 };
15
16 IO::AIO::aio_busy 0.2, sub {
17 print "ok 8\n";
18
19 };
20
21 print "ok 1\n";
22
23 if (open FH, "-|") {
24 print while <FH>;
25 aio_stat "/", sub {
26 print "ok 7\n";
27 };
28 print "ok 5\n";
29 IO::AIO::poll while IO::AIO::nreqs;
30 print "ok 9\n";
31 } else {
32 print "ok 2\n";
33 aio_stat "/", sub {
34 print "ok 3\n";
35 };
36 IO::AIO::poll while IO::AIO::nreqs;
37 print "ok 4\n";
38 exit;
39 }
40
41 print "ok 10\n";
42