exit;
}
-if ($Config{d_sfio} || $^O eq machten || $^O eq beos) {
+if ($Config{d_sfio} || $^O eq 'machten' || $^O eq 'beos' || $^O eq 'posix-bc') {
# Sfio doesn't report failure when closing a broken pipe
# that has pending output. Go figure. MachTen doesn't either,
# but won't write to broken pipes, so nothing's pending at close.
# BeOS will not write to broken pipes, either.
+ # Nor does POSIX-BC.
print "ok 9\n";
}
else {
($rd,$wr) = FileHandle::pipe;
-if ($^O eq 'VMS' || $^O eq 'os2' || $^O eq 'amigaos' || $^O eq 'MSWin32') {
+if ($^O eq 'VMS' || $^O eq 'os2' || $^O eq 'amigaos' || $^O eq 'MSWin32' ||
+ $Config{d_fork} ne 'define') {
$wr->autoflush;
$wr->printf("ok %d\n",11);
print $rd->getline;
use warning 'io' ;
exec "lskdjfalksdjfdjfkls","" ;
EXPECT
-Can't exec "lskdjfalksdjfdjfkls": No such file or directory at - line 3.
+OPTION regex
+Can't exec "lskdjfalksdjfdjfkls": (\w+ )?No such file or directory\.? at - line 3.
########
# doio.c
use warning 'io' ;
exec "lskdjfalksdjfdjfkls", "abc" ;
EXPECT
-Can't exec "lskdjfalksdjfdjfkls": No such file or directory at - line 3.
+OPTION regex
+Can't exec "lskdjfalksdjfdjfkls": (\w+ )?No such file or directory\.? at - line 3.
chdir 't' if -d 't';
@INC = '../lib';
$ENV{PERL5LIB} = '../lib';
+ require Config; import Config;
}
$| = 1;
-my $Is_VMS = $^O eq 'VMS';
+my $Is_VMS = $^O eq 'VMS';
my $Is_MSWin32 = $^O eq 'MSWin32';
my $tmpfile = "tmp0000";
my $i = 0 ;
$results =~ s/\n%[A-Z]+-[SIWEF]-.*$// if $Is_VMS; # clip off DCL status msg
$expected =~ s/\n+$//;
my $prefix = ($results =~ s/^PREFIX\n//) ;
+ # any special options? (OPTIONS foo bar zap)
+ my $option_regex = 0;
+ if ($expected =~ s/^OPTIONS? (.+)\n//) {
+ foreach my $option (split(' ', $1)) {
+ if ($option eq 'regex') { # allow regular expressions
+ $option_regex = 1;
+ } else {
+ die "$0: Unknown OPTION '$option'\n";
+ }
+ }
+ }
if ( $results =~ s/^SKIPPED\n//) {
print "$results\n" ;
}
- elsif (($prefix and $results !~ /^\Q$expected/) or
- (!$prefix and $results ne $expected)){
+ elsif (($prefix && (( $option_regex && $results !~ /^$expected/) ||
+ (!$option_regex && $results !~ /^\Q$expected/))) or
+ (!$prefix && (( $option_regex && $results !~ /^$expected/) ||
+ (!$option_regex && $results ne $expected)))) {
print STDERR "PROG: $switch\n$prog\n";
print STDERR "EXPECTED:\n$expected\n";
print STDERR "GOT:\n$results\n";