if ($#ARGV == -1) {
@ARGV = split(/[ \n]/,
- `echo base/*.t comp/*.t cmd/*.t io/*.t; echo op/*.t pragma/*.t lib/*.t`);
+ `echo base/*.t comp/*.t cmd/*.t run/*.t io/*.t; echo op/*.t pragma/*.t lib/*.t pod/*.t`);
}
-%infinite = ( 'comp/require.t', 1, 'op/bop.t', 1, 'lib/hostname.t', 1 );
+# %infinite = ( 'comp/require.t', 1, 'op/bop.t', 1, 'lib/hostname.t', 1 );
_testprogs('perl', @ARGV);
_testprogs('compile', @ARGV) if (-e "../testcompile");
my $utf = $with_utf ? '-I../lib -Mutf8'
: '';
+ my $testswitch = '-I. -MTestInit'; # -T will strict . from @INC
if ($type eq 'perl') {
- my $run = "./perl$switch $utf $test |";
+ my $run = "./perl $testswitch $switch $utf $test |";
open(RESULTS,$run) or print "can't run '$run': $!.\n";
}
else {
my $compile =
- "./perl -I../lib ../utils/perlcc -o ./$test.plc $utf ./$test "
- ." && ./$test.plc |";
+ "./perl $testswitch -I../lib ../utils/perlcc -o ".
+ "./$test.plc $utf ./$test ".
+ " && ./$test.plc |";
open(RESULTS, $compile)
or print "can't compile '$compile': $!.\n";
unlink "./$test.plc";
$ok = 1;
}
else {
- $next = $1, $ok = 0, last if /^not ok ([0-9]*)/;
- if (/^ok (\d+)(\s*#.*)?/ && $1 == $next) {
- $next = $next + 1;
+ if (/^(not )?ok (\d+)(\s*#.*)?/ &&
+ $2 == $next)
+ {
+ my($not, $num, $extra) = ($1, $2, $3);
+ my($istodo) = $extra =~ /^\s*#\s*TODO/ if $extra;
+
+ if( $not && !$istodo ) {
+ $ok = 0;
+ $next = $num;
+ last;
+ }
+ else {
+ $next = $next + 1;
+ }
}
elsif (/^Bail out!\s*(.*)/i) { # magic words
die "FAILED--Further testing stopped" . ($1 ? ": $1\n" : ".\n");