--- IO-AIO/t/06_group.t 2006/10/22 00:19:05 1.1 +++ IO-AIO/t/06_group.t 2006/10/22 10:33:19 1.3 @@ -4,10 +4,12 @@ print "1..10\n"; -my $grp = aio_group { - print "ok 4\n"; +my $grp = aio_group sub { + print $_[0] == 1 && @_ == 3 ? "" : "not ", "ok 4\n"; }; +$grp->result (1,2,3); + my ($a, $b) = add $grp (aio_stat "/2", sub { print "ok 3\n" }), (aio_stat "/3", sub { print "not ok 3\n" }); @@ -22,10 +24,13 @@ print "ok 5\n"; -$grp = aio_group { - print "not ok 6\n"; +$grp = aio_group sub { + print @_ == 0 ? "" : "not ", "ok 6\n"; }; +$grp->result (4,5,6); +$grp->result; + add $grp aio_stat "/1", sub { print "not ok 7\n" }; $grp->cancel; @@ -34,7 +39,7 @@ IO::AIO::poll while IO::AIO::nreqs; -aio_group { +aio_group sub { print "ok 8\n"; }; @@ -47,4 +52,3 @@ IO::AIO::poll while IO::AIO::nreqs; print "ok 10\n"; -