summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/t
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/perl/t')
-rw-r--r--gnu/usr.bin/perl/t/lib/h2ph.pht4
-rw-r--r--gnu/usr.bin/perl/t/loc_tools.pl3
-rw-r--r--gnu/usr.bin/perl/t/op/quotemeta.t16
-rw-r--r--gnu/usr.bin/perl/t/op/taint.t70
-rw-r--r--gnu/usr.bin/perl/t/porting/customized.dat43
-rw-r--r--gnu/usr.bin/perl/t/porting/dual-life.t6
-rwxr-xr-xgnu/usr.bin/perl/t/re/pat.t8
-rw-r--r--gnu/usr.bin/perl/t/uni/fold.t10
-rw-r--r--gnu/usr.bin/perl/t/uni/overload.t6
9 files changed, 132 insertions, 34 deletions
diff --git a/gnu/usr.bin/perl/t/lib/h2ph.pht b/gnu/usr.bin/perl/t/lib/h2ph.pht
index f068d6dae46..cda8d21051c 100644
--- a/gnu/usr.bin/perl/t/lib/h2ph.pht
+++ b/gnu/usr.bin/perl/t/lib/h2ph.pht
@@ -90,10 +90,6 @@ unless(defined(&_H2PH_H_)) {
}
eval("sub flim () { 0; }") unless defined(&flim);
eval("sub flam () { 1; }") unless defined(&flam);
- eval 'sub blli_in_use {
- my($blli) = @_;
- eval q({ ($blli->{l2_proto}) || ($blli->{l3_proto}); });
- }' unless defined(&blli_in_use);
eval 'sub multiline () {"multilinestring";}' unless defined(&multiline);
}
1;
diff --git a/gnu/usr.bin/perl/t/loc_tools.pl b/gnu/usr.bin/perl/t/loc_tools.pl
index 737e870f8a0..193641d8315 100644
--- a/gnu/usr.bin/perl/t/loc_tools.pl
+++ b/gnu/usr.bin/perl/t/loc_tools.pl
@@ -229,7 +229,8 @@ sub is_locale_utf8 ($) { # Return a boolean as to if core Perl thinks the input
# go through testing all the locales on the platform.
if (CORE::fc(chr utf8::unicode_to_native(0xdf)) ne "ss") {
if ($locale =~ /UTF-?8/i) {
- ok (0, "Verify $locale with UTF-8 in name is a UTF-8 locale");
+ diag("Cannot verify $locale with UTF-8 in name is a UTF-8 locale");
+ #ok (0, "Verify $locale with UTF-8 in name is a UTF-8 locale");
}
}
else {
diff --git a/gnu/usr.bin/perl/t/op/quotemeta.t b/gnu/usr.bin/perl/t/op/quotemeta.t
index 1b8613ac9b9..bb10772c41a 100644
--- a/gnu/usr.bin/perl/t/op/quotemeta.t
+++ b/gnu/usr.bin/perl/t/op/quotemeta.t
@@ -128,10 +128,18 @@ is(length(quotemeta($char)), 1, "quotemeta '\\N{U+D8}' in UTF-8 length");
is(quotemeta($char), "\\$char", "quotemeta '\\N{U+D7}' locale in UTF-8");
is(length(quotemeta($char)), 2, "quotemeta '\\N{U+D7}' locale in UTF-8 length");
- $char = "\N{U+D8}"; # Every non-ASCII Latin1 is quoted in locale.
- utf8::upgrade($char);
- is(quotemeta($char), "\\$char", "quotemeta '\\N{U+D8}' locale in UTF-8");
- is(length(quotemeta($char)), 2, "quotemeta '\\N{U+D8}' locale in UTF-8 length");
+ SKIP: {
+ if (
+ !$Config::Config{d_setlocale}
+ || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
+ ) {
+ skip "no locale support", 2
+ }
+ $char = "\N{U+D8}"; # Every non-ASCII Latin1 is quoted in locale.
+ utf8::upgrade($char);
+ is(quotemeta($char), "\\$char", "quotemeta '\\N{U+D8}' locale in UTF-8");
+ is(length(quotemeta($char)), 2, "quotemeta '\\N{U+D8}' locale in UTF-8 length");
+ }
is(quotemeta("\x{263a}"), "\\\x{263a}", "quotemeta locale Unicode quoted");
is(length(quotemeta("\x{263a}")), 2, "quotemeta locale Unicode quoted length");
diff --git a/gnu/usr.bin/perl/t/op/taint.t b/gnu/usr.bin/perl/t/op/taint.t
index 806208af771..f345869bd4a 100644
--- a/gnu/usr.bin/perl/t/op/taint.t
+++ b/gnu/usr.bin/perl/t/op/taint.t
@@ -17,7 +17,7 @@ BEGIN {
use strict;
use Config;
-plan tests => 800;
+plan tests => 816;
$| = 1;
@@ -298,6 +298,12 @@ my $TEST = 'TEST';
is($res, 1, "$desc: res value");
is($one, 'a', "$desc: \$1 value");
+ SKIP: {
+ if (
+ !$Config::Config{d_setlocale}
+ || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
+ ) {
+ skip "no locale support", 10 }
SKIP: {
skip 'No locale testing without d_setlocale', 10 if(!$Config{d_setlocale});
@@ -317,6 +323,7 @@ my $TEST = 'TEST';
is_tainted($one, "$desc: \$1 tainted");
is($res, 1, "$desc: res value");
is($one, 'abcd', "$desc: \$1 value");
+ }
$desc = "match /g with pattern tainted via locale";
@@ -341,6 +348,13 @@ my $TEST = 'TEST';
$s = 'abcd';
($res) = $s =~ /$TAINT(.+)/;
$one = $1;
+ SKIP: {
+ if (
+ !$Config::Config{d_setlocale}
+ || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
+ ) {
+ skip "no locale support", 12
+ }
isnt_tainted($s, "$desc: s not tainted");
is_tainted($res, "$desc: res tainted");
is_tainted($one, "$desc: \$1 tainted");
@@ -358,9 +372,10 @@ my $TEST = 'TEST';
is($res, 'a', "$desc: res value");
is($res2,'b', "$desc: res2 value");
is($one, 'd', "$desc: \$1 value");
+ }
SKIP: {
- skip 'No locale testing without d_setlocale', 12 if(!$Config{d_setlocale});
+ skip 'No locale testing without d_setlocale', 12 if(!$Config{d_setlocale}) || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/;
$desc = "match with pattern tainted via locale, list cxt";
@@ -479,6 +494,13 @@ my $TEST = 'TEST';
is($one, 'd', "$desc: \$1 value");
$desc = "substitution /ge with pattern tainted";
+ SKIP: {
+ if (
+ !$Config::Config{d_setlocale}
+ || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
+ ) {
+ skip "no locale support", 18
+ }
$s = 'abc';
{
@@ -518,9 +540,10 @@ my $TEST = 'TEST';
is($s, 'abcd', "$desc: s value");
is($res, 'xyz', "$desc: res value");
is($one, 'abcd', "$desc: \$1 value");
+ }
SKIP: {
- skip 'No locale testing without d_setlocale', 18 if(!$Config{d_setlocale});
+ skip 'No locale testing without d_setlocale', 18 if(!$Config{d_setlocale} || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/);
$desc = "substitution with pattern tainted via locale";
@@ -661,6 +684,13 @@ my $TEST = 'TEST';
$desc = "use re 'taint': match /g with string tainted";
$s = 'abcd' . $TAINT;
+ SKIP: {
+ if (
+ !$Config::Config{d_setlocale}
+ || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
+ ) {
+ skip "no locale support", 10
+ }
$res = $s =~ /(.)/g;
$one = $1;
is_tainted($s, "$desc: s tainted");
@@ -668,6 +698,7 @@ my $TEST = 'TEST';
is_tainted($one, "$desc: \$1 tainted");
is($res, 1, "$desc: res value");
is($one, 'a', "$desc: \$1 value");
+ }
$desc = "use re 'taint': match with string tainted, list cxt";
@@ -685,6 +716,13 @@ my $TEST = 'TEST';
$s = 'abcd' . $TAINT;
($res, $res2) = $s =~ /(.)/g;
$one = $1;
+ SKIP: {
+ if (
+ !$Config::Config{d_setlocale}
+ || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
+ ) {
+ skip "no locale support", 12
+ }
is_tainted($s, "$desc: s tainted");
is_tainted($res, "$desc: res tainted");
is_tainted($res2, "$desc: res2 tainted");
@@ -692,6 +730,7 @@ my $TEST = 'TEST';
is($res, 'a', "$desc: res value");
is($res2,'b', "$desc: res2 value");
is($one, 'd', "$desc: \$1 value");
+ }
$desc = "use re 'taint': match with pattern tainted";
@@ -716,7 +755,7 @@ my $TEST = 'TEST';
is($one, 'a', "$desc: \$1 value");
SKIP: {
- skip 'No locale testing without d_setlocale', 10 if(!$Config{d_setlocale});
+ skip 'No locale testing without d_setlocale', 10 if(!$Config{d_setlocale} || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/);
$desc = "use re 'taint': match with pattern tainted via locale";
@@ -777,7 +816,7 @@ my $TEST = 'TEST';
is($one, 'd', "$desc: \$1 value");
SKIP: {
- skip 'No locale testing without d_setlocale', 12 if(!$Config{d_setlocale});
+ skip 'No locale testing without d_setlocale', 12 if(!$Config{d_setlocale} || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/);
$desc = "use re 'taint': match with pattern tainted via locale, list cxt";
@@ -826,6 +865,13 @@ my $TEST = 'TEST';
is_tainted($one, "$desc: \$1 tainted");
is($s, 'xyz', "$desc: s value");
is($res, 1, "$desc: res value");
+ SKIP: {
+ if (
+ !$Config::Config{d_setlocale}
+ || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
+ ) {
+ skip "no locale support", 18
+ }
is($one, 'abcd', "$desc: \$1 value");
$desc = "use re 'taint': substitution /g with string tainted";
@@ -851,6 +897,7 @@ my $TEST = 'TEST';
is($s, 'abcd', "$desc: s value");
is($res, 'xyz', "$desc: res value");
is($one, 'abcd', "$desc: \$1 value");
+ }
$desc = "use re 'taint': substitution /e with string tainted";
@@ -938,8 +985,7 @@ my $TEST = 'TEST';
is($one, 'abcd', "$desc: \$1 value");
SKIP: {
- skip 'No locale testing without d_setlocale', 18 if(!$Config{d_setlocale});
-
+ skip 'No locale testing without d_setlocale', 18 if(!$Config{d_setlocale} || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/);
$desc = "use re 'taint': substitution with pattern tainted via locale";
$s = 'abcd';
@@ -2211,7 +2257,13 @@ end
isnt_tainted($b, "regex optimization of single char /[]/i doesn't taint");
}
-{
+SKIP: {
+ if (
+ !$Config::Config{d_setlocale}
+ || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
+ ) {
+ skip "no locale support", 4
+ }
# RT 81230: tainted value during FETCH created extra ref to tied obj
package P81230;
@@ -2342,7 +2394,7 @@ pass("no death when TARG of ref is tainted");
}
SKIP: {
- skip 'No locale testing without d_setlocale', 4 if(!$Config{d_setlocale});
+ skip 'No locale testing without d_setlocale', 4 if(!$Config{d_setlocale} || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/);
use feature 'fc';
BEGIN {
diff --git a/gnu/usr.bin/perl/t/porting/customized.dat b/gnu/usr.bin/perl/t/porting/customized.dat
index f9620442ee4..3c636c0eda5 100644
--- a/gnu/usr.bin/perl/t/porting/customized.dat
+++ b/gnu/usr.bin/perl/t/porting/customized.dat
@@ -1,13 +1,30 @@
-Module::Build cpan/Module-Build/lib/Module/Build/ConfigData.pm 2f3f07fd889077ebd51791ad6e195d9164b4baf3
-Test::Harness cpan/Test-Harness/t/source.t 61738913dac9ba6c4504756d355c23c25c47d31e
-Test::Harness cpan/Test-Harness/t/testargs.t 79c91b2ea73f7cbfb9bae45dec4a62db74cb8dbf
-Module::Pluggable cpan/Module-Pluggable/Makefile.PL 72062c1a01ed7c62d16c55122c163b2d89f0d739
-autodie cpan/autodie/t/open.t cb493da4305f591ca0344d09e8a840a3147c5579
-libnet cpan/libnet/Makefile.PL 5554b71464b45f5cc002e55f2464f7ff4abd05b6
-podlators cpan/podlators/scripts/pod2man.PL 8fb484dc560adb00889f504760ca0a4defa9dc40
-podlators cpan/podlators/scripts/pod2text.PL 53ccba9264368c3f9acd2a36d1d354797d2a88f6
-podlators pod/perlpodstyle.pod 4f1ba65eddc5576267954b948556e16a9686c411
-CPANPLUS cpan/CPANPLUS/Makefile.PL 5d533f6722af6aae73204755beb8d6c008fc0d4a
-Text-Tabs+Wrap cpan/Text-Tabs/t/fill.t a960d2c4f66b7e30557b5479e0da2da1bf7a7f45
-Text-Tabs+Wrap cpan/Text-Tabs/t/tabs.t 63a67b3a319c858d7e66306b8a653de1951153dc
-Sys::Syslog cpan/Sys-Syslog/t/syslog.t 647571fc90918883b871ff7e005ed7ab8a223784
+Digest::MD5 cpan/Digest-MD5/t/files.t c1417867017210ce3d199eb9d55d8ef61fdf1a83
+Encode cpan/Encode/bin/enc2xs f60036fd3574ec05c9aab7f4db00a828d5dea92d
+Encode cpan/Encode/Byte/Makefile.PL 0986e25f981a3bf182a13a0060d28d4efedd87e6
+Encode cpan/Encode/CN/Makefile.PL 5507a49d822d0c1d14e967f4595e29e9c873540b
+Encode cpan/Encode/EBCDIC/Makefile.PL 574289638393eb6b1109eb9a6874bfe8c5d2ddea
+Encode cpan/Encode/Encode.pm fc26f74b44148a4f0c9e8ec2b0a9c20eae96249d
+Encode cpan/Encode/Encode.xs 9ee24e3915319bdec044535667a39e3dc531fdcf
+Encode cpan/Encode/Encode/Makefile_PL.e2x 4d0420b19cea75c513842329c1906221130bdb6b
+Encode cpan/Encode/JP/Makefile.PL a9ca9c836424cc2ecbefa4933d9da5db54131b98
+Encode cpan/Encode/KR/Makefile.PL 0e46ded62ec6b128e5562277658132700425a48c
+Encode cpan/Encode/Symbol/Makefile.PL 4beddbbd00f638b7de9c6cd0821d9d38020a8218
+Encode cpan/Encode/TW/Makefile.PL 0cc44f95e59f45c0fb3b66bde41525f13c19a25c
+Module::Build cpan/Module-Build/lib/Module/Build/ConfigData.pm 85eb9656e68d1f256737dc52d86b5d0fed28f832
+PerlIO::via::QuotedPrint cpan/PerlIO-via-QuotedPrint/t/QuotedPrint.t ca39f0146e89de02c746e199c45dcb3e5edad691
+Text::Balanced cpan/Text-Balanced/t/01_compile.t 1598cf491a48fa546260a2ec41142abe84da533d
+Text::Balanced cpan/Text-Balanced/t/02_extbrk.t 6ba1b64a4604e822dc2260b8ffcea6b406339ee8
+Text::Balanced cpan/Text-Balanced/t/03_extcbk.t 3307c980af28963414cab799c427b359ef3b8657
+Text::Balanced cpan/Text-Balanced/t/04_extdel.t be993c5c295b125b4be0ed55f866a249599f5835
+Text::Balanced cpan/Text-Balanced/t/05_extmul.t 4d1bc60add35ac203873f5371d8c6fcc9c8b6d80
+Text::Balanced cpan/Text-Balanced/t/06_extqlk.t 81a5804d392013393a338325b197cea52c4c44e0
+Text::Balanced cpan/Text-Balanced/t/07_exttag.t 5a209ed156387d4614d3003292e5fc412b8541e5
+Text::Balanced cpan/Text-Balanced/t/08_extvar.t 0776ef2cbdad5b1fbefb300541d079212cc24d92
+Text::Balanced cpan/Text-Balanced/t/09_gentag.t 42361b5dfb3bb728bce20f4fb0d92ccfb27c2ba7
+Text::ParseWords cpan/Text-ParseWords/t/ParseWords.t 9bae51c9b944cd5c0bbabe9d397e573976a2be8e
+Text::ParseWords cpan/Text-ParseWords/t/taint.t 3cff0dae812801f7aa1738d6070508f2c5bcc2e5
+autodie cpan/autodie/t/utf8_open.t 5295851351c49f939008c5aca6a798742b1e503d
+libnet cpan/libnet/Makefile.PL 13a8e4a8c7fb2607219c3106cad6c3d7173f7221
+podlators cpan/podlators/scripts/pod2man.PL f81acf53f3ff46cdcc5ebdd661c5d13eb35d20d6
+podlators cpan/podlators/scripts/pod2text.PL b4693fcfe4a0a1b38a215cfb8985a65d5d025d69
+version cpan/version/lib/version.pm d0923b895d57f1d669ae36fcf85c87b16db341d1
diff --git a/gnu/usr.bin/perl/t/porting/dual-life.t b/gnu/usr.bin/perl/t/porting/dual-life.t
index 8d9f070b0aa..165738ceafb 100644
--- a/gnu/usr.bin/perl/t/porting/dual-life.t
+++ b/gnu/usr.bin/perl/t/porting/dual-life.t
@@ -23,6 +23,12 @@ use File::Spec::Functions;
# Exceptions that are found in dual-life bin dirs but aren't
# installed by default; some occur only during testing:
my $not_installed = qr{^(?:
+ \.\./cpan/Archive-Tar/bin/ptar.*
+ |
+ \.\./cpan/JSON-PP/bin/json_pp
+ |
+ \.\./cpan/IO-Compress/bin/zipdetails
+ |
\.\./cpan/Encode/bin/u(?:cm(?:2table|lint|sort)|nidump)
|
\.\./cpan/Module-(?:Metadata|Build)
diff --git a/gnu/usr.bin/perl/t/re/pat.t b/gnu/usr.bin/perl/t/re/pat.t
index 51838f9b76b..65091400a5b 100755
--- a/gnu/usr.bin/perl/t/re/pat.t
+++ b/gnu/usr.bin/perl/t/re/pat.t
@@ -509,7 +509,13 @@ sub run_tests {
is(qr/\b\v$/, '(?^:\b\v$)', 'qr/\b\v$/');
}
- { # Test that charset modifier work, and are interpolated
+ SKIP: { # Test that charset modifier work, and are interpolated
+ if (
+ !$Config::Config{d_setlocale}
+ || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
+ ) {
+ skip "no locale support", 13
+ }
is(qr/\b\v$/, '(?^:\b\v$)', 'Verify no locale, no unicode_strings gives default modifier');
is(qr/(?l:\b\v$)/, '(?^:(?l:\b\v$))', 'Verify infix l modifier compiles');
is(qr/(?u:\b\v$)/, '(?^:(?u:\b\v$))', 'Verify infix u modifier compiles');
diff --git a/gnu/usr.bin/perl/t/uni/fold.t b/gnu/usr.bin/perl/t/uni/fold.t
index 94090e941c0..a0e1551b6b4 100644
--- a/gnu/usr.bin/perl/t/uni/fold.t
+++ b/gnu/usr.bin/perl/t/uni/fold.t
@@ -432,7 +432,7 @@ foreach my $test_ref (@CF) {
utf8::upgrade($utf8);
is(fc($latin1), fc($utf8), "fc() gives the same results for \\x{$_} in Latin-1 and UTF-8 under unicode_strings");
SKIP: {
- skip 'No locale testing without d_setlocale', 2 if(!$Config{d_setlocale});
+ skip 'No locale testing without d_setlocale', 2 if(!$Config{d_setlocale}) || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/;
BEGIN {
if($Config{d_setlocale}) {
require locale; import locale;
@@ -441,7 +441,13 @@ foreach my $test_ref (@CF) {
is(fc($latin1), lc($latin1), "use locale; fc(qq{\\x{$_}}), lc(qq{\\x{$_}}) when qq{\\x{$_}} is in latin-1");
is(fc($utf8), lc($utf8), "use locale; fc(qq{\\x{$_}}), lc(qq{\\x{$_}}) when qq{\\x{$_}} is in latin-1");
}
- {
+ SKIP: {
+ if (
+ !$Config::Config{d_setlocale}
+ || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
+ ) {
+ skip "no locale support", 2
+ }
no feature 'unicode_strings';
is(fc($latin1), lc($latin1), "under nothing, fc() for <256 is the same as lc");
}
diff --git a/gnu/usr.bin/perl/t/uni/overload.t b/gnu/usr.bin/perl/t/uni/overload.t
index bd87b6665c9..dbc8e019090 100644
--- a/gnu/usr.bin/perl/t/uni/overload.t
+++ b/gnu/usr.bin/perl/t/uni/overload.t
@@ -101,6 +101,12 @@ eval {
$have_setlocale++;
}
};
+if (
+ !$Config::Config{d_setlocale}
+ || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
+) {
+ $have_setlocale = 0;
+}
SKIP: {
if (!$have_setlocale) {