--- AnyEvent/t/68_poe_09_multi.t 2011/08/02 22:07:18 1.1 +++ AnyEvent/t/68_poe_09_multi.t 2011/08/12 00:53:29 1.3 @@ -1,9 +1,25 @@ +BEGIN { + # check for broken perls + if ($^O =~ /mswin32/i) { + my $ok; + local $SIG{CHLD} = sub { $ok = 1 }; + kill 'CHLD', 0; + + unless ($ok) { + print <begin; my $wa = AE::io $a, 1, sub { $cv->end; $s |= 1 }; @@ -39,7 +55,7 @@ syswrite $b, "x"; $cv = AE::cv; - $wt = AE::timer 0.1, 0, $cv; + $wt = AE::timer 1, 0, $cv; $s = 0; $cv->begin; @@ -136,7 +152,22 @@ print $s == 0 ? "" : "not ", "ok 13 # $s\n"; } -print "ok 14\n"; +# timers (don't laugh, some event loops are more broken...) +{ + my $cv = AE::cv; + my $wt = AE::timer 1, 0, $cv; + my $s = 0; + + $cv->begin; my $wa = AE::timer 0 , 0, sub { $cv->end; $s |= 1 }; + $cv->begin; my $wb = AE::timer 0 , 0, sub { $cv->end; $s |= 2 }; + $cv->begin; my $wc = AE::timer 0.01, 0, sub { $cv->end; $s |= 4 }; + + $cv->recv; + + print $s == 7 ? "" : "not ", "ok 14 # $s\n"; +} + +print "ok 15\n"; exit 0;