summaryrefslogtreecommitdiff
path: root/t/op
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/op
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/op')
-rw-r--r--t/op/64bitint.t2
-rwxr-xr-xt/op/assignwarn.t2
-rw-r--r--t/op/attrs.t2
-rwxr-xr-xt/op/avhv.t2
-rw-r--r--t/op/bless.t2
-rwxr-xr-xt/op/bop.t2
-rwxr-xr-xt/op/closure.t2
-rwxr-xr-xt/op/defins.t2
-rwxr-xr-xt/op/die_exit.t2
-rwxr-xr-xt/op/exists_sub.t2
-rwxr-xr-xt/op/filetest.t2
-rwxr-xr-xt/op/fork.t2
-rwxr-xr-xt/op/glob.t2
-rwxr-xr-xt/op/goto_xs.t2
-rwxr-xr-xt/op/grent.t2
-rwxr-xr-xt/op/gv.t2
-rwxr-xr-xt/op/hashwarn.t2
-rwxr-xr-xt/op/int.t2
-rwxr-xr-xt/op/lex_assign.t2
-rw-r--r--t/op/lfs.t2
-rwxr-xr-xt/op/lop.t2
-rwxr-xr-xt/op/magic.t2
-rwxr-xr-xt/op/method.t2
-rwxr-xr-xt/op/misc.t2
-rwxr-xr-xt/op/mkdir.t2
-rw-r--r--t/op/my_stash.t2
-rwxr-xr-xt/op/nothr5005.t2
-rwxr-xr-xt/op/pack.t2
-rwxr-xr-xt/op/pat.t2
-rwxr-xr-xt/op/pwent.t2
-rwxr-xr-xt/op/quotemeta.t2
-rwxr-xr-xt/op/rand.t2
-rwxr-xr-xt/op/readdir.t2
-rwxr-xr-xt/op/regexp.t2
-rw-r--r--t/op/regmesg.t2
-rwxr-xr-xt/op/runlevel.t2
-rwxr-xr-xt/op/sort.t2
-rwxr-xr-xt/op/sprintf.t2
-rwxr-xr-xt/op/stat.t2
-rwxr-xr-xt/op/subst.t2
-rwxr-xr-xt/op/subst_amp.t2
-rwxr-xr-xt/op/substr.t2
-rwxr-xr-xt/op/taint.t2
-rwxr-xr-xt/op/tie.t2
-rwxr-xr-xt/op/tiearray.t2
-rwxr-xr-xt/op/tiehandle.t2
-rwxr-xr-xt/op/tr.t2
-rwxr-xr-xt/op/undef.t2
-rwxr-xr-xt/op/universal.t2
-rwxr-xr-xt/op/ver.t2
50 files changed, 50 insertions, 50 deletions
diff --git a/t/op/64bitint.t b/t/op/64bitint.t
index 691d44e240..5cfb65acf6 100644
--- a/t/op/64bitint.t
+++ b/t/op/64bitint.t
@@ -7,7 +7,7 @@ BEGIN {
exit(0);
}
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
# This could use many more tests.
diff --git a/t/op/assignwarn.t b/t/op/assignwarn.t
index b95cec51a1..2d05b82289 100755
--- a/t/op/assignwarn.t
+++ b/t/op/assignwarn.t
@@ -8,7 +8,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
use strict;
diff --git a/t/op/attrs.t b/t/op/attrs.t
index 615e4d3343..2702004881 100644
--- a/t/op/attrs.t
+++ b/t/op/attrs.t
@@ -4,7 +4,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
sub NTESTS () ;
diff --git a/t/op/avhv.t b/t/op/avhv.t
index cd7c957619..5b91fd2147 100755
--- a/t/op/avhv.t
+++ b/t/op/avhv.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
require Tie::Array;
diff --git a/t/op/bless.t b/t/op/bless.t
index 46bf6c311e..3aaceb8ce7 100644
--- a/t/op/bless.t
+++ b/t/op/bless.t
@@ -4,7 +4,7 @@ print "1..31\n";
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib' if -d '../lib';
+ @INC = '../lib';
}
sub expected {
diff --git a/t/op/bop.t b/t/op/bop.t
index edee72d05f..8279abae2d 100755
--- a/t/op/bop.t
+++ b/t/op/bop.t
@@ -6,7 +6,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
print "1..35\n";
diff --git a/t/op/closure.t b/t/op/closure.t
index c691d6f034..5f3245fbc9 100755
--- a/t/op/closure.t
+++ b/t/op/closure.t
@@ -7,7 +7,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
use Config;
diff --git a/t/op/defins.t b/t/op/defins.t
index 9e714a718b..33c74ea28e 100755
--- a/t/op/defins.t
+++ b/t/op/defins.t
@@ -6,7 +6,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
$SIG{__WARN__} = sub { $warns++; warn $_[0] };
print "1..14\n";
}
diff --git a/t/op/die_exit.t b/t/op/die_exit.t
index cb0478b9b2..a389946fe3 100755
--- a/t/op/die_exit.t
+++ b/t/op/die_exit.t
@@ -7,7 +7,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib' if -e '../lib';
+ @INC = '../lib';
}
if ($^O eq 'mpeix') {
diff --git a/t/op/exists_sub.t b/t/op/exists_sub.t
index 3363dfd837..d4aa29251a 100755
--- a/t/op/exists_sub.t
+++ b/t/op/exists_sub.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
print "1..9\n";
diff --git a/t/op/filetest.t b/t/op/filetest.t
index e00d5fb7b0..f757c79c05 100755
--- a/t/op/filetest.t
+++ b/t/op/filetest.t
@@ -5,7 +5,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib' if -d '../lib';
+ @INC = '../lib';
}
use Config;
diff --git a/t/op/fork.t b/t/op/fork.t
index 7c2add9dce..93cf673228 100755
--- a/t/op/fork.t
+++ b/t/op/fork.t
@@ -4,7 +4,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
require Config; import Config;
unless ($Config{'d_fork'}
or ($^O eq 'MSWin32' and $Config{useithreads}
diff --git a/t/op/glob.t b/t/op/glob.t
index 4c2744590b..fc0ba77124 100755
--- a/t/op/glob.t
+++ b/t/op/glob.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
print "1..6\n";
diff --git a/t/op/goto_xs.t b/t/op/goto_xs.t
index 8d9bca1cd6..cf2cafd467 100755
--- a/t/op/goto_xs.t
+++ b/t/op/goto_xs.t
@@ -10,7 +10,7 @@
# break correctly as well.
chdir 't' if -d 't';
-unshift @INC, "../lib";
+@INC = '../lib';
$ENV{PERL5LIB} = "../lib";
# turn warnings into fatal errors
diff --git a/t/op/grent.t b/t/op/grent.t
index 27c9427f27..211dc911bb 100755
--- a/t/op/grent.t
+++ b/t/op/grent.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, "../lib" if -d "../lib";
+ @INC = '../lib';
eval {my @n = getgrgid 0};
if ($@ && $@ =~ /(The \w+ function is unimplemented)/) {
print "1..0 # Skip: $1\n";
diff --git a/t/op/gv.t b/t/op/gv.t
index bb10b7538e..431910b298 100755
--- a/t/op/gv.t
+++ b/t/op/gv.t
@@ -6,7 +6,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
use warnings;
diff --git a/t/op/hashwarn.t b/t/op/hashwarn.t
index 9182273ec3..8466a7196e 100755
--- a/t/op/hashwarn.t
+++ b/t/op/hashwarn.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
use strict;
diff --git a/t/op/int.t b/t/op/int.t
index bf2100264d..7d675a4291 100755
--- a/t/op/int.t
+++ b/t/op/int.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
print "1..7\n";
diff --git a/t/op/lex_assign.t b/t/op/lex_assign.t
index 6665f2931b..181c842030 100755
--- a/t/op/lex_assign.t
+++ b/t/op/lex_assign.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
diff --git a/t/op/lfs.t b/t/op/lfs.t
index 97c920c2cf..feee8cc9b3 100644
--- a/t/op/lfs.t
+++ b/t/op/lfs.t
@@ -4,7 +4,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
# Don't bother if there are no quad offsets.
require Config; import Config;
if ($Config{lseeksize} < 8) {
diff --git a/t/op/lop.t b/t/op/lop.t
index f15201ff09..d57271abd6 100755
--- a/t/op/lop.t
+++ b/t/op/lop.t
@@ -6,7 +6,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
print "1..7\n";
diff --git a/t/op/magic.t b/t/op/magic.t
index 27be423a2c..e2acb1f641 100755
--- a/t/op/magic.t
+++ b/t/op/magic.t
@@ -3,7 +3,7 @@
BEGIN {
$| = 1;
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
$SIG{__WARN__} = sub { die "Dying on warning: ", @_ };
}
diff --git a/t/op/method.t b/t/op/method.t
index 6e25310734..be4df75fe2 100755
--- a/t/op/method.t
+++ b/t/op/method.t
@@ -6,7 +6,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib' if -d '../lib';
+ @INC = '../lib';
}
print "1..53\n";
diff --git a/t/op/misc.t b/t/op/misc.t
index 39719b474c..f0d7f547fc 100755
--- a/t/op/misc.t
+++ b/t/op/misc.t
@@ -4,7 +4,7 @@
# separate executable and can't simply use eval.
chdir 't' if -d 't';
-unshift @INC, "../lib";
+@INC = '../lib';
$ENV{PERL5LIB} = "../lib";
$|=1;
diff --git a/t/op/mkdir.t b/t/op/mkdir.t
index cf8e55d75e..c5a090ca7d 100755
--- a/t/op/mkdir.t
+++ b/t/op/mkdir.t
@@ -4,7 +4,7 @@ print "1..9\n";
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
use File::Path;
diff --git a/t/op/my_stash.t b/t/op/my_stash.t
index 79f3f28a08..4a1d5022e0 100644
--- a/t/op/my_stash.t
+++ b/t/op/my_stash.t
@@ -3,7 +3,7 @@
package Foo;
BEGIN {
- unshift @INC, "../lib";
+ @INC = '../lib';
}
use Test;
diff --git a/t/op/nothr5005.t b/t/op/nothr5005.t
index fd36e2e89a..411a0b470e 100755
--- a/t/op/nothr5005.t
+++ b/t/op/nothr5005.t
@@ -6,7 +6,7 @@
BEGIN
{
chdir 't' if -d 't';
- unshift @INC, "../lib";
+ @INC = '../lib';
require Config;
import Config;
if ($Config{'use5005threads'})
diff --git a/t/op/pack.t b/t/op/pack.t
index 5c215c6f0f..67bd547c5b 100755
--- a/t/op/pack.t
+++ b/t/op/pack.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib' if -d '../lib';
+ @INC = '../lib';
require Config; import Config;
}
diff --git a/t/op/pat.t b/t/op/pat.t
index 2ba6d934d2..f0090865a1 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -8,7 +8,7 @@ print "1..223\n";
BEGIN {
chdir 't' if -d 't';
- unshift @INC, "../lib" if -d "../lib";
+ @INC = '../lib';
}
eval 'use Config'; # Defaults assumed if this fails
diff --git a/t/op/pwent.t b/t/op/pwent.t
index ea89505291..4cccbfe016 100755
--- a/t/op/pwent.t
+++ b/t/op/pwent.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, "../lib" if -d "../lib";
+ @INC = '../lib';
eval {my @n = getpwuid 0};
if ($@ && $@ =~ /(The \w+ function is unimplemented)/) {
print "1..0 # Skip: $1\n";
diff --git a/t/op/quotemeta.t b/t/op/quotemeta.t
index ec247f8ce7..ea62ed8ecf 100755
--- a/t/op/quotemeta.t
+++ b/t/op/quotemeta.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib' if -d '../lib';
+ @INC = '../lib';
require Config; import Config;
}
diff --git a/t/op/rand.t b/t/op/rand.t
index 97019bb099..83186aeb66 100755
--- a/t/op/rand.t
+++ b/t/op/rand.t
@@ -17,7 +17,7 @@
BEGIN {
chdir "t" if -d "t";
- unshift @INC, "../lib" if -d "../lib";
+ @INC = '../lib';
}
use strict;
diff --git a/t/op/readdir.t b/t/op/readdir.t
index ad7a8abee3..00199b0fec 100755
--- a/t/op/readdir.t
+++ b/t/op/readdir.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
eval 'opendir(NOSUCH, "no/such/directory");';
diff --git a/t/op/regexp.t b/t/op/regexp.t
index 4ffe1362c6..23ae576c75 100755
--- a/t/op/regexp.t
+++ b/t/op/regexp.t
@@ -33,7 +33,7 @@ $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib' if -d '../lib';
+ @INC = '../lib';
}
$iters = shift || 1; # Poor man performance suite, 10000 is OK.
diff --git a/t/op/regmesg.t b/t/op/regmesg.t
index 2267206b67..f209239841 100644
--- a/t/op/regmesg.t
+++ b/t/op/regmesg.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
my $debug = 1;
diff --git a/t/op/runlevel.t b/t/op/runlevel.t
index 3865e52070..b6c128bcb9 100755
--- a/t/op/runlevel.t
+++ b/t/op/runlevel.t
@@ -7,7 +7,7 @@
##
chdir 't' if -d 't';
-unshift @INC, "../lib";
+@INC = '../lib';
$Is_VMS = $^O eq 'VMS';
$Is_MSWin32 = $^O eq 'MSWin32';
$ENV{PERL5LIB} = "../lib" unless $Is_VMS;
diff --git a/t/op/sort.t b/t/op/sort.t
index 8161701b0e..9095871a29 100755
--- a/t/op/sort.t
+++ b/t/op/sort.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
use warnings;
print "1..57\n";
diff --git a/t/op/sprintf.t b/t/op/sprintf.t
index 8bb75365dd..1fda31e2f0 100755
--- a/t/op/sprintf.t
+++ b/t/op/sprintf.t
@@ -8,7 +8,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
use warnings;
diff --git a/t/op/stat.t b/t/op/stat.t
index 45b7ed9203..1317ba8e7c 100755
--- a/t/op/stat.t
+++ b/t/op/stat.t
@@ -4,7 +4,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
use Config;
diff --git a/t/op/subst.t b/t/op/subst.t
index 9757f4c595..7dd7a1c92c 100755
--- a/t/op/subst.t
+++ b/t/op/subst.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib' if -d '../lib';
+ @INC = '../lib';
require Config; import Config;
}
diff --git a/t/op/subst_amp.t b/t/op/subst_amp.t
index e2e7c0e542..71895720f7 100755
--- a/t/op/subst_amp.t
+++ b/t/op/subst_amp.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib' if -d '../lib';
+ @INC = '../lib';
require Config; import Config;
}
diff --git a/t/op/substr.t b/t/op/substr.t
index f2a0c6c4fe..891e9041a7 100755
--- a/t/op/substr.t
+++ b/t/op/substr.t
@@ -6,7 +6,7 @@ print "1..135\n";
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
use warnings ;
diff --git a/t/op/taint.t b/t/op/taint.t
index 44f50aea18..7cc4447a0b 100755
--- a/t/op/taint.t
+++ b/t/op/taint.t
@@ -9,7 +9,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib' if -d '../lib';
+ @INC = '../lib';
}
use strict;
diff --git a/t/op/tie.t b/t/op/tie.t
index 9543420a42..696a9265fb 100755
--- a/t/op/tie.t
+++ b/t/op/tie.t
@@ -6,7 +6,7 @@
# Currently it only tests the untie warning
chdir 't' if -d 't';
-unshift @INC, "../lib";
+@INC = '../lib';
$ENV{PERL5LIB} = "../lib";
$|=1;
diff --git a/t/op/tiearray.t b/t/op/tiearray.t
index 25fda3fb03..8e78b2f76b 100755
--- a/t/op/tiearray.t
+++ b/t/op/tiearray.t
@@ -3,7 +3,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
my %seen;
diff --git a/t/op/tiehandle.t b/t/op/tiehandle.t
index 6ae3faaaec..d7e6a78baf 100755
--- a/t/op/tiehandle.t
+++ b/t/op/tiehandle.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
my @expect;
diff --git a/t/op/tr.t b/t/op/tr.t
index ea665c7c8a..a6406ffbf6 100755
--- a/t/op/tr.t
+++ b/t/op/tr.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, "../lib";
+ @INC = '../lib';
}
print "1..27\n";
diff --git a/t/op/undef.t b/t/op/undef.t
index 8944ee3976..f6e36a5bed 100755
--- a/t/op/undef.t
+++ b/t/op/undef.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
print "1..27\n";
diff --git a/t/op/universal.t b/t/op/universal.t
index a0a74ec4b2..e6db8e691f 100755
--- a/t/op/universal.t
+++ b/t/op/universal.t
@@ -5,7 +5,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib' if -d '../lib';
+ @INC = '../lib';
$| = 1;
}
diff --git a/t/op/ver.t b/t/op/ver.t
index 5346f392ce..63cb7164dd 100755
--- a/t/op/ver.t
+++ b/t/op/ver.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- unshift @INC, "../lib";
+ @INC = '../lib';
}
print "1..23\n";