summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2020-10-03 18:32:22 +0100
committerKarl Williamson <khw@cpan.org>2020-10-03 14:45:31 -0600
commit8c892c9b16bdf4264f1dbd45d5109bed442e66e8 (patch)
tree9b6f19d3e15d110fe4e290d1dafe105a593e5a7e /t
parentd6049bebb5f7286958c894606abb2df210f104a3 (diff)
downloadperl-8c892c9b16bdf4264f1dbd45d5109bed442e66e8.tar.gz
In tests, fix @INC before loading more stuff
Diffstat (limited to 't')
-rw-r--r--t/io/perlio.t2
-rw-r--r--t/io/pipe.t2
-rw-r--r--t/io/socketpair.t2
-rw-r--r--t/io/utf8.t3
-rw-r--r--t/op/coreamp.t5
-rw-r--r--t/op/goto.t3
-rw-r--r--t/op/split.t2
-rw-r--r--t/op/sprintf2.t2
-rw-r--r--t/op/warn.t17
-rw-r--r--t/re/bigfuzzy_not_utf8.tbin36462 -> 36463 bytes
-rw-r--r--t/re/charset.t2
-rw-r--r--t/re/fold_grind_8.t2
-rw-r--r--t/re/fold_grind_T.t2
-rw-r--r--t/re/fold_grind_a.t2
-rw-r--r--t/re/fold_grind_aa.t2
-rw-r--r--t/re/fold_grind_d.t2
-rw-r--r--t/re/fold_grind_l.t2
-rw-r--r--t/re/fold_grind_u.t2
-rw-r--r--t/re/pat.t5
-rw-r--r--t/re/pat_advanced.t2
-rw-r--r--t/re/pat_re_eval.t3
-rw-r--r--t/re/regex_sets.t2
-rw-r--r--t/re/speed.t2
-rw-r--r--t/uni/method.t3
-rw-r--r--t/uni/overload.t4
25 files changed, 41 insertions, 34 deletions
diff --git a/t/io/perlio.t b/t/io/perlio.t
index d9ecc9824e..1d03583433 100644
--- a/t/io/perlio.t
+++ b/t/io/perlio.t
@@ -1,8 +1,8 @@
BEGIN {
chdir 't' if -d 't';
- require Config; import Config;
require './test.pl';
set_up_inc('../lib');
+ require Config; import Config;
skip_all_without_perlio();
}
diff --git a/t/io/pipe.t b/t/io/pipe.t
index bdf743c26c..af8838c1a0 100644
--- a/t/io/pipe.t
+++ b/t/io/pipe.t
@@ -2,9 +2,9 @@
BEGIN {
chdir 't' if -d 't';
- require Config; import Config;
require './test.pl';
set_up_inc('../lib');
+ require Config; import Config;
}
if (!$Config{'d_fork'}) {
skip_all("fork required to pipe");
diff --git a/t/io/socketpair.t b/t/io/socketpair.t
index a80e411d7d..9730d6b086 100644
--- a/t/io/socketpair.t
+++ b/t/io/socketpair.t
@@ -2,9 +2,9 @@
BEGIN {
chdir 't' if -d 't';
- require Config; import Config;
require './test.pl';
set_up_inc('../lib');
+ require Config; import Config;
skip_all_if_miniperl();
for my $needed (qw(d_socket)) {
if ($Config{$needed} ne 'define') {
diff --git a/t/io/utf8.t b/t/io/utf8.t
index 0bc8a5c2bf..2ea7429f4d 100644
--- a/t/io/utf8.t
+++ b/t/io/utf8.t
@@ -2,8 +2,9 @@
BEGIN {
chdir 't' if -d 't';
- require './test.pl'; require './charset_tools.pl';
+ require './test.pl';
set_up_inc('../lib');
+ require './charset_tools.pl';
}
skip_all_without_perlio();
diff --git a/t/op/coreamp.t b/t/op/coreamp.t
index 3320ff75d2..b57609bef0 100644
--- a/t/op/coreamp.t
+++ b/t/op/coreamp.t
@@ -9,9 +9,10 @@
BEGIN {
chdir 't' if -d 't';
- require "./test.pl"; require './charset_tools.pl';
- $^P |= 0x100;
+ require "./test.pl";
set_up_inc( qw(. ../lib ../dist/if) );
+ require './charset_tools.pl';
+ $^P |= 0x100; # Provide informative "file" names for evals
}
no warnings 'experimental::smartmatch';
diff --git a/t/op/goto.t b/t/op/goto.t
index db08e1e2c1..80c99d20b1 100644
--- a/t/op/goto.t
+++ b/t/op/goto.t
@@ -4,8 +4,9 @@
BEGIN {
chdir 't' if -d 't';
- require "./test.pl"; require './charset_tools.pl';
+ require "./test.pl";
set_up_inc( qw(. ../lib) );
+ require './charset_tools.pl';
}
use warnings;
diff --git a/t/op/split.t b/t/op/split.t
index 7377616564..64b11d4640 100644
--- a/t/op/split.t
+++ b/t/op/split.t
@@ -3,8 +3,8 @@
BEGIN {
chdir 't' if -d 't';
require './test.pl';
- require './charset_tools.pl';
set_up_inc('../lib');
+ require './charset_tools.pl';
}
plan tests => 178;
diff --git a/t/op/sprintf2.t b/t/op/sprintf2.t
index 7cb5d9bf40..bbc12ccd0a 100644
--- a/t/op/sprintf2.t
+++ b/t/op/sprintf2.t
@@ -5,8 +5,8 @@
BEGIN {
chdir 't' if -d 't';
require './test.pl';
- require './charset_tools.pl';
set_up_inc('../lib');
+ require './charset_tools.pl';
}
# We'll run 12 extra tests (see below) if $Q is false.
diff --git a/t/op/warn.t b/t/op/warn.t
index 0bf6967a60..739110549d 100644
--- a/t/op/warn.t
+++ b/t/op/warn.t
@@ -3,8 +3,9 @@
BEGIN {
chdir 't' if -d 't';
- require './test.pl'; require './charset_tools.pl';
+ require './test.pl';
set_up_inc('../lib');
+ require './charset_tools.pl';
}
plan 33;
@@ -26,7 +27,7 @@ ok @warnings==1 && $warnings[0] eq "foobar\n";
@warnings = ();
$@ = "";
warn "foo";
-ok @warnings==1 && $warnings[0] eq "foo at warn.t line 28.\n";
+ok @warnings==1 && $warnings[0] eq "foo at warn.t line 29.\n";
@warnings = ();
$@ = "";
@@ -37,13 +38,13 @@ ok @warnings==1 && ref($warnings[0]) eq "ARRAY" && $warnings[0] == $wa;
$@ = "";
warn "";
ok @warnings==1 &&
- $warnings[0] eq "Warning: something's wrong at warn.t line 38.\n";
+ $warnings[0] eq "Warning: something's wrong at warn.t line 39.\n";
@warnings = ();
$@ = "";
warn;
ok @warnings==1 &&
- $warnings[0] eq "Warning: something's wrong at warn.t line 44.\n";
+ $warnings[0] eq "Warning: something's wrong at warn.t line 45.\n";
@warnings = ();
$@ = "ERR\n";
@@ -58,7 +59,7 @@ ok @warnings==1 && $warnings[0] eq "foobar\n";
@warnings = ();
$@ = "ERR\n";
warn "foo";
-ok @warnings==1 && $warnings[0] eq "foo at warn.t line 60.\n";
+ok @warnings==1 && $warnings[0] eq "foo at warn.t line 61.\n";
@warnings = ();
$@ = "ERR\n";
@@ -69,13 +70,13 @@ ok @warnings==1 && ref($warnings[0]) eq "ARRAY" && $warnings[0] == $wa;
$@ = "ERR\n";
warn "";
ok @warnings==1 &&
- $warnings[0] eq "ERR\n\t...caught at warn.t line 70.\n";
+ $warnings[0] eq "ERR\n\t...caught at warn.t line 71.\n";
@warnings = ();
$@ = "ERR\n";
warn;
ok @warnings==1 &&
- $warnings[0] eq "ERR\n\t...caught at warn.t line 76.\n";
+ $warnings[0] eq "ERR\n\t...caught at warn.t line 77.\n";
@warnings = ();
$@ = $ea;
@@ -90,7 +91,7 @@ ok @warnings==1 && $warnings[0] eq "foobar\n";
@warnings = ();
$@ = $ea;
warn "foo";
-ok @warnings==1 && $warnings[0] eq "foo at warn.t line 92.\n";
+ok @warnings==1 && $warnings[0] eq "foo at warn.t line 93.\n";
@warnings = ();
$@ = $ea;
diff --git a/t/re/bigfuzzy_not_utf8.t b/t/re/bigfuzzy_not_utf8.t
index 2daace5d41..bef761b7d3 100644
--- a/t/re/bigfuzzy_not_utf8.t
+++ b/t/re/bigfuzzy_not_utf8.t
Binary files differ
diff --git a/t/re/charset.t b/t/re/charset.t
index dc156c0caf..84961772a1 100644
--- a/t/re/charset.t
+++ b/t/re/charset.t
@@ -3,8 +3,8 @@
BEGIN {
chdir 't' if -d 't';
require './test.pl';
- require './loc_tools.pl';
set_up_inc('../lib', '../dist/if');
+ require './loc_tools.pl';
}
use strict;
diff --git a/t/re/fold_grind_8.t b/t/re/fold_grind_8.t
index b614c10638..1030fc778a 100644
--- a/t/re/fold_grind_8.t
+++ b/t/re/fold_grind_8.t
@@ -9,8 +9,8 @@ no warnings 'once';
BEGIN {
chdir 't' if -d 't';
require './test.pl';
- require './loc_tools.pl';
set_up_inc('../lib');
+ require './loc_tools.pl';
}
skip_all "No locales" unless locales_enabled('LC_CTYPE');
diff --git a/t/re/fold_grind_T.t b/t/re/fold_grind_T.t
index 8b026cdfd0..df587230a4 100644
--- a/t/re/fold_grind_T.t
+++ b/t/re/fold_grind_T.t
@@ -9,8 +9,8 @@ no warnings 'once';
BEGIN {
chdir 't' if -d 't';
require './test.pl';
- require './loc_tools.pl';
set_up_inc('../lib');
+ require './loc_tools.pl';
}
skip_all "No locales" unless locales_enabled('LC_CTYPE');
diff --git a/t/re/fold_grind_a.t b/t/re/fold_grind_a.t
index 175e9ca3b9..db112fb76e 100644
--- a/t/re/fold_grind_a.t
+++ b/t/re/fold_grind_a.t
@@ -7,8 +7,8 @@ no warnings 'once';
BEGIN {
chdir 't' if -d 't';
require './test.pl';
- require './loc_tools.pl';
set_up_inc('../lib');
+ require './loc_tools.pl';
}
$::TEST_CHUNK = 'a';
diff --git a/t/re/fold_grind_aa.t b/t/re/fold_grind_aa.t
index 40df70684c..173fd5b710 100644
--- a/t/re/fold_grind_aa.t
+++ b/t/re/fold_grind_aa.t
@@ -9,8 +9,8 @@ no warnings 'once';
BEGIN {
chdir 't' if -d 't';
require './test.pl';
- require './loc_tools.pl';
set_up_inc('../lib');
+ require './loc_tools.pl';
}
$::TEST_CHUNK = 'aa';
diff --git a/t/re/fold_grind_d.t b/t/re/fold_grind_d.t
index 14897fb3e6..f36774590a 100644
--- a/t/re/fold_grind_d.t
+++ b/t/re/fold_grind_d.t
@@ -7,8 +7,8 @@ no warnings 'once';
BEGIN {
chdir 't' if -d 't';
require './test.pl';
- require './loc_tools.pl';
set_up_inc('../lib');
+ require './loc_tools.pl';
}
$::TEST_CHUNK = 'd';
diff --git a/t/re/fold_grind_l.t b/t/re/fold_grind_l.t
index c5cfc7b32f..59b46b8550 100644
--- a/t/re/fold_grind_l.t
+++ b/t/re/fold_grind_l.t
@@ -7,8 +7,8 @@ no warnings 'once';
BEGIN {
chdir 't' if -d 't';
require './test.pl';
- require './loc_tools.pl';
set_up_inc('../lib');
+ require './loc_tools.pl';
}
skip_all "No locales" unless locales_enabled('LC_CTYPE');
diff --git a/t/re/fold_grind_u.t b/t/re/fold_grind_u.t
index fb2013ed59..b2f9bf6e60 100644
--- a/t/re/fold_grind_u.t
+++ b/t/re/fold_grind_u.t
@@ -7,8 +7,8 @@ no warnings 'once';
BEGIN {
chdir 't' if -d 't';
require './test.pl';
- require './loc_tools.pl';
set_up_inc('../lib');
+ require './loc_tools.pl';
}
$::TEST_CHUNK = 'u';
diff --git a/t/re/pat.t b/t/re/pat.t
index b01c7d16fc..a0086cfaed 100644
--- a/t/re/pat.t
+++ b/t/re/pat.t
@@ -16,10 +16,11 @@ $| = 1;
BEGIN {
chdir 't' if -d 't';
+ require './test.pl';
+ set_up_inc('../lib', '.', '../ext/re');
require Config; import Config;
- require './test.pl'; require './charset_tools.pl';
+ require './charset_tools.pl';
require './loc_tools.pl';
- set_up_inc('../lib', '.', '../ext/re');
}
skip_all_without_unicode_tables();
diff --git a/t/re/pat_advanced.t b/t/re/pat_advanced.t
index b5c7f1cab4..b8de776ae5 100644
--- a/t/re/pat_advanced.t
+++ b/t/re/pat_advanced.t
@@ -7,8 +7,8 @@
BEGIN {
chdir 't' if -d 't';
require './test.pl';
- require './charset_tools.pl';
set_up_inc(qw '../lib .');
+ require './charset_tools.pl';
skip_all_if_miniperl("miniperl can't load Tie::Hash::NamedCapture, need for %+ and %-");
}
diff --git a/t/re/pat_re_eval.t b/t/re/pat_re_eval.t
index 75c6ed6306..70b807b9e2 100644
--- a/t/re/pat_re_eval.t
+++ b/t/re/pat_re_eval.t
@@ -17,8 +17,9 @@ $| = 1;
BEGIN {
chdir 't' if -d 't';
- require './test.pl'; require './charset_tools.pl';
+ require './test.pl';
set_up_inc('../lib');
+ require './charset_tools.pl';
}
our @global;
diff --git a/t/re/regex_sets.t b/t/re/regex_sets.t
index ee7905946c..c7d8736d91 100644
--- a/t/re/regex_sets.t
+++ b/t/re/regex_sets.t
@@ -8,9 +8,9 @@
BEGIN {
chdir 't' if -d 't';
require './test.pl';
+ set_up_inc( '../lib','.','../ext/re' );
require './charset_tools.pl';
require './loc_tools.pl';
- set_up_inc( '../lib','.','../ext/re' );
}
skip_all_without_unicode_tables();
diff --git a/t/re/speed.t b/t/re/speed.t
index e2d01ab3ce..26f5ae63ca 100644
--- a/t/re/speed.t
+++ b/t/re/speed.t
@@ -16,9 +16,9 @@
BEGIN {
chdir 't' if -d 't';
- require Config; import Config;
require './test.pl';
set_up_inc('../lib','.','../ext/re');
+ require Config; import Config;
}
skip_all('no re module') unless defined &DynaLoader::boot_DynaLoader;
diff --git a/t/uni/method.t b/t/uni/method.t
index cc710ef112..7fb7f18f48 100644
--- a/t/uni/method.t
+++ b/t/uni/method.t
@@ -6,8 +6,9 @@
BEGIN {
chdir 't' if -d 't';
- require "./test.pl"; require './charset_tools.pl';
+ require "./test.pl";
set_up_inc( qw(. ../lib ../cpan/parent/lib) );
+ require './charset_tools.pl';
}
use strict;
diff --git a/t/uni/overload.t b/t/uni/overload.t
index 161484500e..3004614b43 100644
--- a/t/uni/overload.t
+++ b/t/uni/overload.t
@@ -2,11 +2,11 @@
BEGIN {
chdir 't' if -d 't';
- require Config; import Config;
require './test.pl';
+ set_up_inc( '../lib' );
+ require Config; import Config;
require './charset_tools.pl';
require './loc_tools.pl';
- set_up_inc( '../lib' );
}
plan(tests => 193);