This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Get index.t working under miniperl
authorFather Chrysostomos <sprout@cpan.org>
Tue, 2 Sep 2014 07:47:08 +0000 (00:47 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 3 Sep 2014 03:11:17 +0000 (20:11 -0700)
If things are broken enough that make_ext.pl cannot run, then mini-
test may run this script before everything is built.  Hence, we need
to make sure the directories that buildcustomize.pl puts in @INC are
not clobbered by the test script.

t/op/index.t

index 78faeb6..86a1fd7 100644 (file)
@@ -2,8 +2,10 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    @INC = '../lib';
-    require './test.pl'; require './charset_tools.pl';
+    require './test.pl';
+    @INC = () unless is_miniperl();
+    unshift @INC, '../lib';
+    require './charset_tools.pl';
 }
 
 use strict;