# symbolic filehandles should only result in glob entries with FH constructors
+$|=1;
my $a = "SYM000";
print "not " if defined(fileno($a)) or defined *{$a};
++$test; print "ok $test\n";
$switch = $1;
}
my($prog,$expected) = split(/\nEXPECT\n/, $_);
+ open TEST, ">$tmpfile" or die "Cannot open $tmpfile: $!";
+ print TEST $prog, "\n";
+ close TEST or die "Cannot close $tmpfile: $!";
+
if ($^O eq 'MSWin32') {
- open TEST, "| .\\perl -I../lib $switch >$tmpfile 2>&1";
+ $results = `.\\perl -I../lib $switch $tmpfile 2>&1`;
}
else {
- open TEST, "| sh -c './perl $switch' >$tmpfile 2>&1";
+ $results = `./perl $switch $tmpfile 2>&1`;
}
- print TEST $prog, "\n";
- close TEST;
$status = $?;
- $results = `$CAT $tmpfile`;
$results =~ s/\n+$//;
+ $results =~ s/at\s+misctmp\d+\s+line/at - line/g;
+ $results =~ s/of\s+misctmp\d+\s+aborted/of - aborted/g;
# bison says 'parse error' instead of 'syntax error',
# various yaccs may or may not capitalize 'syntax'.
$results =~ s/^(syntax|parse) error/syntax error/mig;
EXPECT
Can't call method "ref" without a package or object reference at - line 1.
########
-chop ($str .= <STDIN>);
+chop ($str .= <DATA>);
########
close ($banana);
########
########
system './perl -ne "print if eof" /dev/null'
########
-chop($file = <>);
+chop($file = <DATA>);
########
package N;
sub new {my ($obj,$n)=@_; bless \$n}
`MCR $^X "-I[-.lib]" $switch $tmpfile` :
$Is_MSWin32 ?
`.\\perl -I../lib $switch $tmpfile 2>&1` :
- `sh -c './perl $switch $tmpfile' 2>&1`;
+ `./perl $switch $tmpfile 2>&1`;
my $status = $?;
$results =~ s/\n+$//;
# allow expected output to be written as if $prog is on STDIN
`MCR $^X $switch $tmpfile` :
$Is_MSWin32 ?
`.\\perl -I../lib $switch $tmpfile 2>&1` :
- `sh -c './perl $switch $tmpfile' 2>&1`;
+ `./perl $switch $tmpfile 2>&1`;
my $status = $?;
$results =~ s/\n+$//;
# allow expected output to be written as if $prog is on STDIN
`MCR $^X $switch $tmpfile` :
$Is_MSWin32 ?
`.\\perl -I../lib $switch $tmpfile 2>&1` :
- `sh -c './perl $switch $tmpfile' 2>&1`;
+ `./perl $switch $tmpfile 2>&1`;
my $status = $?;
$results =~ s/\n+$//;
# allow expected output to be written as if $prog is on STDIN
`MCR $^X $switch $tmpfile` :
$Is_MSWin32 ?
`.\\perl -I../lib $switch $tmpfile 2>&1` :
- `sh -c './perl $switch $tmpfile' 2>&1`;
+ `./perl $switch $tmpfile 2>&1`;
my $status = $?;
$results =~ s/\n+$//;
# allow expected output to be written as if $prog is on STDIN