summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Test/Harness.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Test/Harness.pm b/lib/Test/Harness.pm
index 8804cbd8b8..662ec7ff33 100644
--- a/lib/Test/Harness.pm
+++ b/lib/Test/Harness.pm
@@ -83,7 +83,8 @@ sub runtests {
$fh->open($test) or print "can't open $test. $!\n";
my $first = <$fh>;
my $s = $switches;
- $s .= q[ "-T"] if $first =~ /^#!.*\bperl.*-\w*T/;
+ $s .= join " ", q[ "-T"], map {qq["-I$_"]} @INC
+ if $first =~ /^#!.*\bperl.*-\w*T/;
$fh->close or print "can't close $test. $!\n";
my $cmd = ($ENV{'COMPILE_TEST'})?
"./perl -I../lib ../utils/perlcc $test -run 2>> ./compilelog |"