aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorGabor Szabo <szabgab@gmail.com>2010-02-11 21:26:35 -0800
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-11 21:26:35 -0800
commitdc4e122eaf5710d1af8ddd48ef4cb747efaaa9a9 (patch)
tree2d2da08f853fed3426f7ce7fecfd39e8597ffe2f /t
parenta7196a73cec5af3aa91f0af93d6316df1db7f433 (diff)
downloadbugs-dc4e122eaf5710d1af8ddd48ef4cb747efaaa9a9.tar
bugs-dc4e122eaf5710d1af8ddd48ef4cb747efaaa9a9.tar.gz
bugs-dc4e122eaf5710d1af8ddd48ef4cb747efaaa9a9.tar.bz2
bugs-dc4e122eaf5710d1af8ddd48ef4cb747efaaa9a9.tar.xz
bugs-dc4e122eaf5710d1af8ddd48ef4cb747efaaa9a9.zip
Bug 545762: Allow tests to pass when using the PERL5LIB environment variable.
r=mkanat, a=mkanat
Diffstat (limited to 't')
-rw-r--r--t/001compile.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/001compile.t b/t/001compile.t
index 3e4273492..9e63da0b4 100644
--- a/t/001compile.t
+++ b/t/001compile.t
@@ -27,6 +27,7 @@
use strict;
use 5.008001;
use lib qw(. lib t);
+use Config;
use Support::Files;
use Test::More tests => scalar(@Support::Files::testitems);
@@ -59,8 +60,12 @@ sub compile_file {
$T = "T";
}
+ my $libs = '';
+ if ($ENV{PERL5LIB}) {
+ $libs = join " ", map { "-I$_" } split /$Config{path_sep}/, $ENV{PERL5LIB};
+ }
my $perl = qq{"$^X"};
- my $output = `$perl -wc$T $file 2>&1`;
+ my $output = `$perl $libs -wc$T $file 2>&1`;
chomp($output);
my $return_val = $?;
$output =~ s/^\Q$file\E syntax OK$//ms;