In switchI.t, use nolib => 1 to make the tests pass on miniperl once more.
authorNicholas Clark <nick@ccl4.org>
Mon, 21 Feb 2011 11:47:58 +0000 (11:47 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 21 Feb 2011 11:51:20 +0000 (11:51 +0000)
fresh_perl_is() defaults to automatically prefixing the test perl's arguments
with -I../lib, which (now) causes miniperl to find ../lib/buildcustomize.pl,
which (when found and run) resets @INC, perturbing the tests. Suppressing the
automatic addition of -I../lib avoids these problems.

Also, fold together the two adjacent BEGIN blocks at the start of the script.

t/run/switchI.t

index ffee2f9..27f78a6 100644 (file)
@@ -4,9 +4,6 @@ BEGIN {
     chdir 't' if -d 't';
     unshift @INC, '../lib';
     require './test.pl';       # for which_perl() etc
-}
-
-BEGIN {
     plan(4);
 }
 
@@ -23,10 +20,10 @@ SKIP: {
 
 $lib = 'Bla2';
 fresh_perl_is("print grep { \$_ eq '$lib' } \@INC[0..(\$#INC-1)]", $lib,
-             { switches => ['-IBla2'] }, '-I');
+             { switches => ['-IBla2'], nolib => 1 }, '-I');
 SKIP: {
   skip 'Double colons not allowed in dir spec', 1 if $Is_VMS;
   $lib = 'Foo::Bar2';
   fresh_perl_is("print grep { \$_ eq '$lib' } \@INC", $lib,
-               { switches => ['-IFoo::Bar2'] }, '-I with colons');
+               { switches => ['-IFoo::Bar2'], nolib => 1 }, '-I with colons');
 }