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

Comparing IO-AIO/t/06_group.t (file contents):
Revision 1.2 by root, Sun Oct 22 00:49:29 2006 UTC vs.
Revision 1.3 by root, Sun Oct 22 10:33:19 2006 UTC

3use IO::AIO; 3use IO::AIO;
4 4
5print "1..10\n"; 5print "1..10\n";
6 6
7my $grp = aio_group sub { 7my $grp = aio_group sub {
8 print "ok 4\n"; 8 print $_[0] == 1 && @_ == 3 ? "" : "not ", "ok 4\n";
9}; 9};
10
11$grp->result (1,2,3);
10 12
11my ($a, $b) = 13my ($a, $b) =
12 add $grp (aio_stat "/2", sub { print "ok 3\n" }), 14 add $grp (aio_stat "/2", sub { print "ok 3\n" }),
13 (aio_stat "/3", sub { print "not ok 3\n" }); 15 (aio_stat "/3", sub { print "not ok 3\n" });
14 16
21IO::AIO::poll while IO::AIO::nreqs; 23IO::AIO::poll while IO::AIO::nreqs;
22 24
23print "ok 5\n"; 25print "ok 5\n";
24 26
25$grp = aio_group sub { 27$grp = aio_group sub {
26 print "not ok 6\n"; 28 print @_ == 0 ? "" : "not ", "ok 6\n";
27}; 29};
30
31$grp->result (4,5,6);
32$grp->result;
28 33
29add $grp aio_stat "/1", sub { print "not ok 7\n" }; 34add $grp aio_stat "/1", sub { print "not ok 7\n" };
30 35
31$grp->cancel; 36$grp->cancel;
32 37
45IO::AIO::aio_sleep 0, sub { print "ok 9\n" }; 50IO::AIO::aio_sleep 0, sub { print "ok 9\n" };
46 51
47IO::AIO::poll while IO::AIO::nreqs; 52IO::AIO::poll while IO::AIO::nreqs;
48 53
49print "ok 10\n"; 54print "ok 10\n";
50

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines