X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fio_poll.t;h=d391566a7feced3e87249e8de917e1852e7eb91d;hb=569bd3158af2276a406770e3d68e76b7da59b730;hp=d907d5414b53bc27be48c0247e3148c87d186e02;hpb=cf7fe8a27ac6ee8776974a7c83e80425f2ec0ff8;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/lib/io_poll.t b/t/lib/io_poll.t index d907d54..d391566 100755 --- a/t/lib/io_poll.t +++ b/t/lib/io_poll.t @@ -3,14 +3,19 @@ BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; - @INC = '../lib' if -d '../lib'; + @INC = '../lib'; } } +if ($^O eq 'mpeix') { + print "1..0 # Skip: broken on MPE/iX\n"; + exit 0; +} + select(STDERR); $| = 1; select(STDOUT); $| = 1; -print "1..8\n"; +print "1..9\n"; use IO::Handle; use IO::Poll qw(/POLL/); @@ -34,6 +39,11 @@ print "ok 2\n"; $poll->poll(0.1); +if ($^O eq 'MSWin32') { +print "ok 3 # skipped, doesn't work on non-socket fds\n"; +print "ok 4 # skipped, doesn't work on non-socket fds\n"; +} +else { print "not " unless $poll->events($stdout) == POLLOUT; print "ok 3\n"; @@ -41,6 +51,7 @@ print "ok 3\n"; print "not " if $poll->events($dupout); print "ok 4\n"; +} my @h = $poll->handles; print "not " @@ -64,3 +75,8 @@ $poll->poll(0.1); print "not " if $poll->events($stdout); print "ok 8\n"; + +$poll->remove($dupout); +print "not " + if $poll->handles; +print "ok 9\n";