This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Factorize numeric constant for "overloading" lexical hint
[perl5.git] / lib / lib.t
index 41280ee..5d4ff3a 100644 (file)
--- a/lib/lib.t
+++ b/lib/lib.t
@@ -2,11 +2,12 @@
 
 BEGIN {
     chdir 't';
-    @INC = '../lib';
+    unshift @INC, '..';
+    unshift @INC, '../lib';
     @OrigINC = @INC;
 }
 
-use Test::More tests => 12;
+use Test::More tests => 13;
 use Config;
 use File::Spec;
 use File::Path;
@@ -81,6 +82,9 @@ BEGIN {
 
 no lib $Lib_Dir;
 
+unlike( do { eval 'use lib $Config{installsitelib};'; $@ || '' },
+       qr/::Config is read-only/, 'lib handles readonly stuff' );
+
 BEGIN {
     is( grep(/stuff/, @INC), 0, 'no lib' );
     ok( !do 'Yup.pm',           '   do() effected' );