Adding in TestSetup.pm to replace BEGIN preamble on tests.
[p5sagit/p5-mst-13.2.git] / t / TEST
diff --git a/t/TEST b/t/TEST
index acefb54..98d5fe3 100755 (executable)
--- a/t/TEST
+++ b/t/TEST
@@ -91,14 +91,16 @@ EOT
 
        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";