#!./perl
BEGIN {
chdir 't' if -d 't';
}
$| = 1;
undef $/;
my $tmpfile = "tmp0000";
my $i = 0 ;
1 while -e ++$tmpfile;
if (s/^\s*-\w+//){
$switch = $&;
}
shift @files ;
if @files % 2 ;
print F $code ;
close F ;
}
shift @files ;
}
my $status = $?;
$results =~ s/\n+$//;
# allow expected output to be written as if $prog is on STDIN
# bison says 'parse error' instead of 'syntax error',
# various yaccs may or may not capitalize 'syntax'.
$expected =~ s/\n+$//;
}
print "not ";
}
print "ok ", ++$i, "\n";
{ unlink $_ if $_ }
}
# Error - not predeclaring a sub
Fred 1,2 ;
sub Fred {}
########
# Error - not predeclaring a sub in time
Fred 1,2 ;
sub Fred {}
########
# AOK
Fred 1,2 ;
3
########
# override a built-in function
open 1,2 ;
3
########
# override a built-in function, call after definition
open 1,2 ;
3
########
# override a built-in function, call with ()
3
########
# override a built-in function, call with () after definition
3
########
Fred 1,2 ;
1;
--FILE--
require "./abc" ;
3
########
# check that it isn't affected by block scope
{
}
Fred 1, 2;
3