summaryrefslogtreecommitdiff
path: root/t/pragma
diff options
context:
space:
mode:
authorMike Guy <mjtg@cam.ac.uk>2000-08-25 16:15:59 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2000-08-29 02:09:53 +0000
commit20822f61cc01ab34be1e17db483aceb9d5ec8fb7 (patch)
treee81ff4ef8b435f718d8ca14ebf2df9dbf32a3601 /t/pragma
parent4009639630e1c5aaaff711ab11d5e4837d5bfe2c (diff)
downloadperl-20822f61cc01ab34be1e17db483aceb9d5ec8fb7.tar.gz
Use minimal @INC in tests, most of the time just '../lib',
so that we simply can't pick up stuff from other Perls than the one we are testing. Pointed out by Subject: Re: [PATCH: 6757] make new Storable tests forgiving of places where not built Message-Id: <E13SKH1-00031D-00@virgo.cus.cam.ac.uk> p4raw-id: //depot/perl@6874
Diffstat (limited to 't/pragma')
-rwxr-xr-xt/pragma/constant.t2
-rwxr-xr-xt/pragma/diagnostics.t4
-rwxr-xr-xt/pragma/locale.t2
-rwxr-xr-xt/pragma/overload.t2
-rwxr-xr-xt/pragma/strict.t2
-rwxr-xr-xt/pragma/sub_lval.t2
-rwxr-xr-xt/pragma/subs.t2
-rwxr-xr-xt/pragma/utf8.t2
-rw-r--r--t/pragma/warnings.t2
9 files changed, 10 insertions, 10 deletions
diff --git a/t/pragma/constant.t b/t/pragma/constant.t
index dde64ceebd..450b4d02cf 100755
--- a/t/pragma/constant.t
+++ b/t/pragma/constant.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib' if -d '../lib';
+ @INC = '../lib';
}
use warnings;
diff --git a/t/pragma/diagnostics.t b/t/pragma/diagnostics.t
index 15cd6b5927..14014f6b68 100755
--- a/t/pragma/diagnostics.t
+++ b/t/pragma/diagnostics.t
@@ -1,8 +1,8 @@
#!./perl
BEGIN {
- chdir '..' if -d '../pod';
- unshift @INC, './lib' if -d './lib';
+ chdir '..' if -d '../pod' && -d '../t';
+ @INC = 'lib';
}
diff --git a/t/pragma/locale.t b/t/pragma/locale.t
index 5f601153aa..c8a0df8724 100755
--- a/t/pragma/locale.t
+++ b/t/pragma/locale.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
unshift @INC, '.';
require Config; import Config;
if (!$Config{d_setlocale} || $Config{ccflags} =~ /\bD?NO_LOCALE\b/) {
diff --git a/t/pragma/overload.t b/t/pragma/overload.t
index a5949b68d8..42e400637f 100755
--- a/t/pragma/overload.t
+++ b/t/pragma/overload.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
package Oscalar;
diff --git a/t/pragma/strict.t b/t/pragma/strict.t
index 167b3604f5..5b245d0ab4 100755
--- a/t/pragma/strict.t
+++ b/t/pragma/strict.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
$ENV{PERL5LIB} = '../lib';
}
diff --git a/t/pragma/sub_lval.t b/t/pragma/sub_lval.t
index e96c329d8e..3ab8766892 100755
--- a/t/pragma/sub_lval.t
+++ b/t/pragma/sub_lval.t
@@ -2,7 +2,7 @@ print "1..46\n";
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
sub a : lvalue { my $a = 34; bless \$a } # Return a temporary
diff --git a/t/pragma/subs.t b/t/pragma/subs.t
index fe84f5ef76..cebb635d60 100755
--- a/t/pragma/subs.t
+++ b/t/pragma/subs.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
$ENV{PERL5LIB} = '../lib';
}
diff --git a/t/pragma/utf8.t b/t/pragma/utf8.t
index d1546feeaf..1d0bef798e 100755
--- a/t/pragma/utf8.t
+++ b/t/pragma/utf8.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
$ENV{PERL5LIB} = '../lib';
if ( ord("\t") != 9 ) { # skip on ebcdic platforms
print "1..0 # Skip utf8 tests on ebcdic platform.\n";
diff --git a/t/pragma/warnings.t b/t/pragma/warnings.t
index a551740b17..66b4ff9160 100644
--- a/t/pragma/warnings.t
+++ b/t/pragma/warnings.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
$ENV{PERL5LIB} = '../lib';
require Config; import Config;
}