summaryrefslogtreecommitdiff
path: root/t/run
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-06-25 19:57:19 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-06-25 19:57:19 +0200
commite63be7465b2d564165a64209685cfd7026a2005b (patch)
treeff47a7c8e5014efbcaf54a81c56527e2c94e89ef /t/run
parent15932acc618e3c642a4814dee6429b92b088b3fd (diff)
downloadperl-e63be7465b2d564165a64209685cfd7026a2005b.tar.gz
Trim all trailing / from "." in @INC when filling %INC
This fixes bug #66942 : as a / was left in the directory name, $INC{"Foo.pm"} for a file loaded from the current directory was given the incorrect value "/Foo.pm".
Diffstat (limited to 't/run')
-rw-r--r--t/run/runenv.t17
1 files changed, 16 insertions, 1 deletions
diff --git a/t/run/runenv.t b/t/run/runenv.t
index 03706ed08a..3628bd08a9 100644
--- a/t/run/runenv.t
+++ b/t/run/runenv.t
@@ -15,7 +15,7 @@ BEGIN {
require './test.pl'
}
-plan tests => 76;
+plan tests => 78;
my $STDOUT = tempfile();
my $STDERR = tempfile();
@@ -147,6 +147,21 @@ try({PERL5OPT => '-Mstrict -Mwarnings'},
"ok",
"");
+open F, ">", "Oooof.pm" or die "Can't write Oooof.pm: $!";
+print F "package Oooof; 1;\n";
+close F;
+END { 1 while unlink "Oooof.pm" }
+
+try({PERL5OPT => '-I. -MOooof'},
+ ['-e', 'print "ok" if $INC{"Oooof.pm"} eq "Oooof.pm"'],
+ "ok",
+ "");
+
+try({PERL5OPT => '-I./ -MOooof'},
+ ['-e', 'print "ok" if $INC{"Oooof.pm"} eq "Oooof.pm"'],
+ "ok",
+ "");
+
try({PERL5OPT => '-w -w'},
['-e', 'print $ENV{PERL5OPT}'],
'-w -w',