require './test.pl'
}
-plan tests => 75;
+plan tests => 78;
my $STDOUT = tempfile();
my $STDERR = tempfile();
"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',
'-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',