As discussed eariler in http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-02/msg00908.html I've added t/TestSetup.pm and made t/TEST use it. I had to be careful to do "-I. -MTestSetup" or else modules which used taint would not work. A few tests which used do EXPR assumed that '.' would be in @INC, so I had to change from C<do 'foo'> to C<do './foo'>. None of them were testing the @INC lookup properties of do(). I'm a little concerned that this might have problems on VMS, looking at the special case in TEST for VMS command line switches. Could people give me feedback? --- MANIFEST 2001/02/18 06:00:24 1.3 +++ MANIFEST 2001/02/18 18:37:42 @@ -1331,6 +1331,7 @@ sv.h Scalar value header t/README Instructions for regression tests t/TEST The regression tester +t/TestSetup.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 --- t/TEST 2001/02/18 04:06:36 1.4 +++ t/TEST 2001/02/18 18:35:39 @@ -91,14 +91,16 @@ my $utf = $with_utf ? '-I../lib -Mutf8' : ''; + my $testswitch = '-I. -MTestSetup'; # -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"; --- t/op/eval.t 2001/02/18 18:21:20 1.1 +++ t/op/eval.t 2001/02/18 18:21:23 @@ -37,7 +37,7 @@ 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 --- t/op/regexp_noamp.t 2001/02/18 18:22:45 1.1 +++ t/op/regexp_noamp.t 2001/02/18 18:22:52 @@ -3,7 +3,7 @@ $skip_amp = 1; for $file ('op/regexp.t', 't/op/regexp.t') { if (-r $file) { - do $file; + do "./$file"; exit; } } --- t/op/subst_wamp.t 2001/02/18 18:23:12 1.1 +++ t/op/subst_wamp.t 2001/02/18 18:23:19 @@ -3,7 +3,7 @@ $dummy = defined $&; # Now we have it... for $file ('op/subst.t', 't/op/subst.t') { if (-r $file) { - do $file; + do "./$file"; exit; } }