Remove duplicate entries from MANIFEST
[p5sagit/p5-mst-13.2.git] / t / run / runenv.t
index 1d2a6a7..3628bd0 100644 (file)
@@ -15,7 +15,7 @@ BEGIN {
     require './test.pl'
 }
 
-plan tests => 75;
+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',
@@ -157,6 +172,15 @@ try({PERL5OPT => '-t'},
     '-1',
     '');
 
+try({PERL5OPT => '-W'},
+    ['-e', 'local $^W = 0;  no warnings;  print $x'],
+    '',
+    <<ERROR
+Name "main::x" used only once: possible typo at -e line 1.
+Use of uninitialized value \$x in print at -e line 1.
+ERROR
+);
+
 try({PERLLIB => "foobar$Config{path_sep}42"},
     ['-e', 'print grep { $_ eq "foobar" } @INC'],
     'foobar',