Commit dc4e122e authored by Gabor Szabo's avatar Gabor Szabo Committed by Max Kanat-Alexander

Bug 545762: Allow tests to pass when using the PERL5LIB environment variable.

r=mkanat, a=mkanat
parent a7196a73
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
use strict; use strict;
use 5.008001; use 5.008001;
use lib qw(. lib t); use lib qw(. lib t);
use Config;
use Support::Files; use Support::Files;
use Test::More tests => scalar(@Support::Files::testitems); use Test::More tests => scalar(@Support::Files::testitems);
...@@ -59,8 +60,12 @@ sub compile_file { ...@@ -59,8 +60,12 @@ sub compile_file {
$T = "T"; $T = "T";
} }
my $libs = '';
if ($ENV{PERL5LIB}) {
$libs = join " ", map { "-I$_" } split /$Config{path_sep}/, $ENV{PERL5LIB};
}
my $perl = qq{"$^X"}; my $perl = qq{"$^X"};
my $output = `$perl -wc$T $file 2>&1`; my $output = `$perl $libs -wc$T $file 2>&1`;
chomp($output); chomp($output);
my $return_val = $?; my $return_val = $?;
$output =~ s/^\Q$file\E syntax OK$//ms; $output =~ s/^\Q$file\E syntax OK$//ms;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment