summaryrefslogtreecommitdiff
path: root/t/run
diff options
context:
space:
mode:
authorSlaven Rezic <slaven@rezic.de>2002-10-30 12:18:47 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2002-11-04 21:43:53 +0000
commit574c798aa09309489c549b50dff81b705c3afde8 (patch)
tree3cfb04bb9b6ffdf738489fda25bab10a92d066b1 /t/run
parent48fe685d5098bdc7e2779da74c52af7e601b5c7e (diff)
downloadperl-574c798aa09309489c549b50dff81b705c3afde8.tar.gz
Re: [perl #18066] Bug in -I when path has double colons?
Message-ID: <87of9c2prs.fsf@vran.herceg.de> With the corresponding change to embed.fnc p4raw-id: //depot/perl@18102
Diffstat (limited to 't/run')
-rw-r--r--t/run/runenv.t24
-rw-r--r--t/run/switchI.t19
2 files changed, 42 insertions, 1 deletions
diff --git a/t/run/runenv.t b/t/run/runenv.t
index 236f84eabb..317784ae31 100644
--- a/t/run/runenv.t
+++ b/t/run/runenv.t
@@ -16,7 +16,7 @@ BEGIN {
use Test;
-plan tests => 11;
+plan tests => 15;
my $STDOUT = './results-0';
my $STDERR = './results-1';
@@ -145,6 +145,28 @@ try({PERL5OPT => '-t'},
'1',
'');
+try({PERLLIB => "foobar:42"},
+ ['-e', 'print grep { $_ eq "foobar" } @INC'],
+ 'foobar',
+ '');
+
+try({PERLLIB => "foobar:42"},
+ ['-e', 'print grep { $_ eq "42" } @INC'],
+ '42',
+ '');
+
+try({PERL5LIB => "foobar:42"},
+ ['-e', 'print grep { $_ eq "foobar" } @INC'],
+ 'foobar',
+ '');
+
+try({PERL5LIB => "foobar:42"},
+ ['-e', 'print grep { $_ eq "42" } @INC'],
+ '42',
+ '');
+
+# PERL5LIB tests with included arch directories still missing
+
END {
1 while unlink $STDOUT;
1 while unlink $STDERR;
diff --git a/t/run/switchI.t b/t/run/switchI.t
new file mode 100644
index 0000000000..fa74b9435e
--- /dev/null
+++ b/t/run/switchI.t
@@ -0,0 +1,19 @@
+#!./perl -IFoo::Bar -IBla
+
+BEGIN {
+ chdir 't' if -d 't';
+ unshift @INC, '../lib';
+ require './test.pl'; # for which_perl() etc
+}
+
+BEGIN {
+ plan(4);
+}
+
+ok(grep { $_ eq 'Bla' } @INC);
+ok(grep { $_ eq 'Foo::Bar' } @INC);
+
+fresh_perl_is('print grep { $_ eq "Bla2" } @INC', 'Bla2',
+ { switches => ['-IBla2'] }, '-I');
+fresh_perl_is('print grep { $_ eq "Foo::Bar2" } @INC', 'Foo::Bar2',
+ { switches => ['-IFoo::Bar2'] }, '-I with colons');