} else {
$expected = to_value(shift);
my ($regex,$ignore);
- if ((ref($expected)||'') eq 're') {
+ if ((ref($expected)||'') eq 'Regexp') {
$ok = $result =~ /$expected/;
} elsif (($regex) = ($expected =~ m,^ / (.+) / $,sx) or
($ignore, $regex) = ($expected =~ m,^ m([^\w\s]) (.+) \1 $,sx)) {
my $prefix = "Test $ntest";
print $TESTOUT "# $prefix got: '$result' ($context)\n";
$prefix = ' ' x (length($prefix) - 5);
- if ((ref($expected)||'') eq 're') {
+ if ((ref($expected)||'') eq 'Regexp') {
$expected = 'qr/'.$expected.'/'
} else {
$expected = "'$expected'";
$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";
print "not "
if $poll->events($dupout);
print "ok 4\n";
+}
my @h = $poll->handles;
print "not "
print "1..29\n";
+# XXX known to leak scalars
+$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
+
sub backwards { $a lt $b ? 1 : $a gt $b ? -1 : 0 }
my $upperfirst = 'A' lt 'a';