Message-ID: <
20010218134435.A17544@magnonel.guild.net>
Applied, but as t/TestInit.pm.
p4raw-id: //depot/perl@8829
sv.h Scalar value header
t/README Instructions for regression tests
t/TEST The regression tester
+t/TestInit.pm Preamble library for core tests
t/base/commonsense.t See if configuration meets basic needs
t/base/cond.t See if conditionals work
t/base/if.t See if if works
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";
--- /dev/null
+# This is a replacement for the old BEGIN preamble which heads (or
+# should head) up every core test program to prep it for running.
+# Now instead of:
+#
+# BEGIN {
+# chdir 't' if -d 't';
+# @INC = '../lib';
+# }
+#
+# t/TEST will use -MTestInit. It also doesn't hurt if you "use TestInit"
+# (not require) in the test scripts.
+#
+# PS this is not POD because this should be a very minimalist module in
+# case of fundemental perl breakage.
+
+chdir 't' if -d 't';
+@INC = '../lib';
print try 'print "ok 10\n"; unlink "Op.eval";',"\n";
close try;
-do 'Op.eval'; print $@;
+do './Op.eval'; print $@;
# Test the singlequoted eval optimizer
$skip_amp = 1;
for $file ('op/regexp.t', 't/op/regexp.t') {
if (-r $file) {
- do $file;
+ do "./$file";
exit;
}
}
$dummy = defined $&; # Now we have it...
for $file ('op/subst.t', 't/op/subst.t') {
if (-r $file) {
- do $file;
+ do "./$file";
exit;
}
}