summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/t
diff options
context:
space:
mode:
authorafresh1 <afresh1@openbsd.org>2021-03-01 23:14:32 +0000
committerafresh1 <afresh1@openbsd.org>2021-03-01 23:14:32 +0000
commitde8cc8edbc71bd3e3bc7fbffa27ba0e564c37d8b (patch)
tree5e91ea1711126841ef19ee1ee17705e29dc6baf0 /gnu/usr.bin/perl/t
parentUpdate the MSI addresses for the Armada 8040. This chunk will only be (diff)
downloadwireguard-openbsd-de8cc8edbc71bd3e3bc7fbffa27ba0e564c37d8b.tar.xz
wireguard-openbsd-de8cc8edbc71bd3e3bc7fbffa27ba0e564c37d8b.zip
Import perl-5.32.1
OK sthen@
Diffstat (limited to 'gnu/usr.bin/perl/t')
-rw-r--r--gnu/usr.bin/perl/t/benchmark/gh7094-speed-up-keys-on-empty-hash.t84
-rw-r--r--gnu/usr.bin/perl/t/comp/parser_run.t20
-rw-r--r--gnu/usr.bin/perl/t/io/data.t6
-rw-r--r--gnu/usr.bin/perl/t/io/eintr_print.t4
-rw-r--r--gnu/usr.bin/perl/t/io/openpid.t2
-rwxr-xr-xgnu/usr.bin/perl/t/io/perlio_open.t14
-rw-r--r--gnu/usr.bin/perl/t/lib/CannotParse.pm2
-rw-r--r--gnu/usr.bin/perl/t/lib/croak/pp_ctl8
-rw-r--r--gnu/usr.bin/perl/t/lib/croak/regcomp122
-rw-r--r--gnu/usr.bin/perl/t/lib/feature/bits45
-rw-r--r--gnu/usr.bin/perl/t/lib/feature/indirect141
-rw-r--r--gnu/usr.bin/perl/t/lib/warnings/gv82
-rw-r--r--gnu/usr.bin/perl/t/op/caller.pl2
-rw-r--r--gnu/usr.bin/perl/t/op/cmpchain.t173
-rw-r--r--gnu/usr.bin/perl/t/op/isa.t49
-rw-r--r--gnu/usr.bin/perl/t/op/lfs.t2
-rw-r--r--gnu/usr.bin/perl/t/op/signame_canonical.t75
-rw-r--r--gnu/usr.bin/perl/t/op/tr_latin1.t8
-rw-r--r--gnu/usr.bin/perl/t/porting/authors.t13
-rw-r--r--gnu/usr.bin/perl/t/porting/extrefs.t2
-rwxr-xr-xgnu/usr.bin/perl/t/porting/test_bootstrap.t14
-rw-r--r--gnu/usr.bin/perl/t/re/anyof.t345
-rw-r--r--gnu/usr.bin/perl/t/re/begin-once.t28
-rw-r--r--gnu/usr.bin/perl/t/re/regexp_nonull.t1
-rw-r--r--gnu/usr.bin/perl/t/re/uniprops01.t2
-rw-r--r--gnu/usr.bin/perl/t/re/uniprops02.t2
-rw-r--r--gnu/usr.bin/perl/t/re/uniprops03.t2
-rw-r--r--gnu/usr.bin/perl/t/re/uniprops04.t2
-rw-r--r--gnu/usr.bin/perl/t/re/uniprops05.t2
-rw-r--r--gnu/usr.bin/perl/t/re/uniprops06.t2
-rw-r--r--gnu/usr.bin/perl/t/re/uniprops07.t2
-rw-r--r--gnu/usr.bin/perl/t/re/uniprops08.t2
-rw-r--r--gnu/usr.bin/perl/t/re/uniprops09.t2
-rw-r--r--gnu/usr.bin/perl/t/re/uniprops10.t2
34 files changed, 1057 insertions, 205 deletions
diff --git a/gnu/usr.bin/perl/t/benchmark/gh7094-speed-up-keys-on-empty-hash.t b/gnu/usr.bin/perl/t/benchmark/gh7094-speed-up-keys-on-empty-hash.t
new file mode 100644
index 00000000000..764ae73198d
--- /dev/null
+++ b/gnu/usr.bin/perl/t/benchmark/gh7094-speed-up-keys-on-empty-hash.t
@@ -0,0 +1,84 @@
+#!/usr/bin/perl -w
+use strict;
+use Benchmark;
+chdir 't' if -d 't';
+require './test.pl';
+plan(tests => 6);
+
+=head1 NAME
+
+gh7094 - benchmark speed for keys() on empty hashes
+
+=head1 DESCRIPTION
+
+If you have an empty hash, the speed of keys() depends
+on how many keys the hash previously held.
+
+For global hashes, getting the count for previously
+big hashes was substantially slower than for lexical hashes.
+
+This test checks that the speed difference for getting
+the number or list of keys from an empty hash is about the same
+(< 25%) for lexical and global hashes, both previously big and small.
+
+=head1 REFERENCE
+
+This test tests against GitHub ticket #7094
+
+L<https://github.com/Perl/perl5/issues/7094>
+
+=cut
+
+use vars qw(%h_big %h_small);
+my %l_big = (1..50000);
+my %l_small = (1..10);
+
+%h_big = (1..50000);
+%h_small = (1..10);
+
+delete @h_big{keys %h_big};
+delete @h_small{keys %h_small};
+delete @l_big{keys %l_big};
+delete @l_small{keys %l_small};
+
+my $res = timethese shift || -3, {
+ big => '1 for keys %h_big',
+ small => '1 for keys %h_small',
+ scalar_big => '$a = keys %h_big',
+ scalar_small => '$a = keys %h_small',
+
+ lex_big => '1 for keys %l_big',
+ lex_small => '1 for keys %l_small',
+ lex_scalar_big => '$a = keys %l_big',
+ lex_scalar_small => '$a = keys %l_small',
+}, 'none';
+
+sub iters_per_second {
+ $_[0]->iters / $_[0]->cpu_p
+}
+
+sub about_as_fast_ok {
+ my ($res, $key1, $key2, $name) = @_;
+ $name ||= "Speed difference between $key1 and $key2 is less than 25%";
+ my %iters_per_second = map { $_ => iters_per_second( $res->{ $_ }) } ($key1, $key2);
+
+ my $ratio = abs(1 - $iters_per_second{ $key1 } / ($iters_per_second{ $key2 } || 1 ));
+ if (! cmp_ok( $ratio, '<', 0.25, $name )) {
+ diag( sprintf "%20s: %12.2f/s\n", $key1, $iters_per_second{ $key1 } );
+ diag( sprintf "%20s: %12.2f/s\n", $key2, $iters_per_second{ $key2 } );
+ };
+};
+
+about_as_fast_ok( $res, 'scalar_big', 'scalar_small',"Checking the count of hash keys in an empty hash (global)");
+
+about_as_fast_ok( $res, 'big', 'small', "Checking the list of hash keys in an empty hash (global)");
+
+about_as_fast_ok( $res, 'lex_scalar_big', 'lex_scalar_small',"Checking the count of hash keys in an empty hash (lexical)");
+
+about_as_fast_ok( $res, 'lex_big', 'lex_small', "Checking the list of hash keys in an empty hash (lexical)");
+
+about_as_fast_ok( $res, 'lex_scalar_big', 'scalar_big',"Checking the count of hash keys in an empty hash, global vs. lexical");
+
+about_as_fast_ok( $res, 'lex_big', 'big', "Checking the list of hash keys in an empty hash, global vs. lexical");
+
+__END__
diff --git a/gnu/usr.bin/perl/t/comp/parser_run.t b/gnu/usr.bin/perl/t/comp/parser_run.t
index 79b669d8075..b36b5ad1646 100644
--- a/gnu/usr.bin/perl/t/comp/parser_run.t
+++ b/gnu/usr.bin/perl/t/comp/parser_run.t
@@ -10,12 +10,12 @@ BEGIN {
set_up_inc( qw(. ../lib ) );
}
-plan(5);
+plan(7);
# [perl #130814] can reallocate lineptr while looking ahead for
# "Missing $ on loop variable" diagnostic.
my $result = fresh_perl(
- " foreach m0\n\$" . ("0" x 0x2000),
+ " foreach m0\n\$" . ("v" x 0x2000),
{ stderr => 1 },
);
is($result . "\n", <<EXPECT);
@@ -24,6 +24,12 @@ syntax error at - line 3, near "foreach m0
Identifier too long at - line 3.
EXPECT
+fresh_perl_is(<<'EOS', <<'EXPECT', {}, "check zero vars");
+print $001;
+EOS
+Numeric variables with more than one digit may not start with '0' at - line 1.
+EXPECT
+
fresh_perl_is(<<EOS, <<'EXPECT', {}, "linestart before bufptr");
\${ \xB6eeeeeeeeeeee
'x
@@ -55,5 +61,15 @@ syntax error at - line 1, at EOF
Execution of - aborted due to compilation errors.
EXPECTED
+{
+ my $work = tempfile;
+ open my $fh, ">", $work or die;
+ binmode $fh;
+ print $fh +("\n" x 50_000), "1;\n";
+ close $fh;
+ fresh_perl_is('require "./' . $work .'"; print "ok\n";', "ok\n",
+ {}, "many blank lines doesn't crash");
+}
+
__END__
# ex: set ts=8 sts=4 sw=4 et:
diff --git a/gnu/usr.bin/perl/t/io/data.t b/gnu/usr.bin/perl/t/io/data.t
index 03779a9177a..0f72de8644a 100644
--- a/gnu/usr.bin/perl/t/io/data.t
+++ b/gnu/usr.bin/perl/t/io/data.t
@@ -20,7 +20,7 @@ run_multiple_progs('', \*DATA);
done_testing();
__END__
-# http://rt.perl.org/rt3/Ticket/Display.html?id=28106#txn-82657
+# https://github.com/Perl/perl5/issues/7207#issuecomment-543940952
while (<DATA>) {
chomp;
print "$.: '$_'\n";
@@ -35,7 +35,7 @@ EXPECT
2: '2'
3: '3'
########
-# http://rt.perl.org/rt3/Ticket/Display.html?id=28106#txn-83113
+# https://github.com/Perl/perl5/issues/7207#issuecomment-543940955
my $line1 = <DATA>;
`echo foo`;
my $line2 = <DATA>;
@@ -48,7 +48,7 @@ EXPECT
ok 1
ok 2
########
-# http://rt.perl.org/rt3/Ticket/Attachment/828796/403048/perlbug.rep.txt
+# https://github.com/Perl/perl5/issues/7207#issuecomment-543940992
my @data_positions = tell(DATA);
while (<DATA>){
if (/^__DATA__$/) {
diff --git a/gnu/usr.bin/perl/t/io/eintr_print.t b/gnu/usr.bin/perl/t/io/eintr_print.t
index 1a3fd2b9b3a..207511302d5 100644
--- a/gnu/usr.bin/perl/t/io/eintr_print.t
+++ b/gnu/usr.bin/perl/t/io/eintr_print.t
@@ -1,7 +1,7 @@
#!./perl
# print should not return EINTR
-# fails under 5.14.x see https://rt.perl.org/rt3/Ticket/Display.html?id=119097
+# fails under 5.14.x see https://github.com/Perl/perl5/issues/13142
# also fails under 5.8.x
BEGIN {
@@ -20,7 +20,7 @@ use IO::Handle;
skip_all("only for dev versions for now") if ((int($]*1000) & 1) == 0);
skip_all("does not match platform whitelist")
- unless ($^O =~ /^(linux|.*bsd|darwin|solaris)$/);
+ unless ($^O =~ /^(linux|android|.*bsd|darwin|solaris)$/);
skip_all("ualarm() not implemented on this platform")
unless Time::HiRes::d_ualarm();
skip_all("usleep() not implemented on this platform")
diff --git a/gnu/usr.bin/perl/t/io/openpid.t b/gnu/usr.bin/perl/t/io/openpid.t
index 8912f39c05c..dad6af091ae 100644
--- a/gnu/usr.bin/perl/t/io/openpid.t
+++ b/gnu/usr.bin/perl/t/io/openpid.t
@@ -39,7 +39,7 @@ my @perl = ( which_perl(), "-I../lib" );
# the other reader reads one line, waits a few seconds and then
# exits to test the waitpid function.
#
-# Using 4+ arg open for the children that sleep so that that we're
+# Using 4+ arg open for the children that sleep so that we're
# killing the perl process instead of an intermediate shell, this
# allows harness to see the file handles closed sooner. I didn't
# convert them all since I wanted 3-arg open to continue to be
diff --git a/gnu/usr.bin/perl/t/io/perlio_open.t b/gnu/usr.bin/perl/t/io/perlio_open.t
index 99d7e51646b..56c354bf677 100755
--- a/gnu/usr.bin/perl/t/io/perlio_open.t
+++ b/gnu/usr.bin/perl/t/io/perlio_open.t
@@ -11,7 +11,7 @@ BEGIN {
use strict;
use warnings;
-plan tests => 6;
+plan tests => 10;
use Fcntl qw(:seek);
@@ -31,6 +31,16 @@ use Fcntl qw(:seek);
is($data, "the right read stuff", "found the right stuff");
}
-
+SKIP:
+{
+ ok((open my $fh, "+>>", undef), "open my \$fh, '+>>', undef")
+ or skip "can't open temp for append: $!", 3;
+ print $fh "abc";
+ ok(seek($fh, 0, SEEK_SET), "seek to zero");
+ print $fh "xyz";
+ ok(seek($fh, 0, SEEK_SET), "seek to zero again");
+ my $data = <$fh>;
+ is($data, "abcxyz", "check the second write appended");
+}
diff --git a/gnu/usr.bin/perl/t/lib/CannotParse.pm b/gnu/usr.bin/perl/t/lib/CannotParse.pm
new file mode 100644
index 00000000000..a84195f4473
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/CannotParse.pm
@@ -0,0 +1,2 @@
+# a module that fails parsing
+-
diff --git a/gnu/usr.bin/perl/t/lib/croak/pp_ctl b/gnu/usr.bin/perl/t/lib/croak/pp_ctl
index b1e754c356b..de0221b57d3 100644
--- a/gnu/usr.bin/perl/t/lib/croak/pp_ctl
+++ b/gnu/usr.bin/perl/t/lib/croak/pp_ctl
@@ -51,3 +51,11 @@ use 5.01;
default{}
EXPECT
Can't "default" outside a topicalizer at - line 2.
+########
+# NAME croak with read only $@
+eval '"a" =~ /${*@=\_})/';
+die;
+# this would previously recurse infinitely in the eval
+EXPECT
+Unmatched ) in regex; marked by <-- HERE in m/_) <-- HERE / at (eval 1) line 1.
+ ...propagated at - line 2.
diff --git a/gnu/usr.bin/perl/t/lib/croak/regcomp b/gnu/usr.bin/perl/t/lib/croak/regcomp
index 0ba705e9159..a203f136fd6 100644
--- a/gnu/usr.bin/perl/t/lib/croak/regcomp
+++ b/gnu/usr.bin/perl/t/lib/croak/regcomp
@@ -4,28 +4,28 @@ __END__
qr/\N{U+7FFFFFFFFFFFFFFF}/;
qr/\N{U+1_0000_0000_0000_0000}/;
EXPECT
-Use of code point 0x1_0000_0000_0000_0000 is not allowed; the permissible max is 0x7fffffffffffffff in regex; marked by <-- HERE in m/\N{U+1_0000_0000_0000_0000 <-- HERE }/ at - line 2.
+Use of code point 0x1_0000_0000_0000_0000 is not allowed; the permissible max is 0x7FFFFFFFFFFFFFFF in regex; marked by <-- HERE in m/\N{U+1_0000_0000_0000_0000 <-- HERE }/ at - line 2.
########
# NAME \N{U+too large} on 32-bit machine
# SKIP ? use Config; $Config{uvsize} > 4 && "Not 32 bit"
qr/\N{U+7FFFFFFF}/;
qr/\N{U+1_0000_0000}/;
EXPECT
-Use of code point 0x1_0000_0000 is not allowed; the permissible max is 0x7fffffff in regex; marked by <-- HERE in m/\N{U+1_0000_0000 <-- HERE }/ at - line 2.
+Use of code point 0x1_0000_0000 is not allowed; the permissible max is 0x7FFFFFFF in regex; marked by <-- HERE in m/\N{U+1_0000_0000 <-- HERE }/ at - line 2.
########
# NAME \N{U+100.too large} on 64-bit machine
# SKIP ? use Config; $Config{uvsize} < 8 && "Not 64 bit"
qr/\N{U+100.7FFFFFFFFFFFFFFF}/;
qr/\N{U+100.1_0000_0000_0000_0000}/;
EXPECT
-Use of code point 0x1_0000_0000_0000_0000 is not allowed; the permissible max is 0x7fffffffffffffff in regex; marked by <-- HERE in m/\N{U+100.1_0000_0000_0000_0000 <-- HERE }/ at - line 2.
+Use of code point 0x1_0000_0000_0000_0000 is not allowed; the permissible max is 0x7FFFFFFFFFFFFFFF in regex; marked by <-- HERE in m/\N{U+100.1_0000_0000_0000_0000 <-- HERE }/ at - line 2.
########
# NAME \N{U+100.too large} on 32-bit machine
# SKIP ? use Config; $Config{uvsize} > 4 && "Not 32 bit"
qr/\N{U+100.7FFFFFFF}/;
qr/\N{U+100.1_0000_0000}/;
EXPECT
-Use of code point 0x1_0000_0000 is not allowed; the permissible max is 0x7fffffff in regex; marked by <-- HERE in m/\N{U+100.1_0000_0000 <-- HERE }/ at - line 2.
+Use of code point 0x1_0000_0000 is not allowed; the permissible max is 0x7FFFFFFF in regex; marked by <-- HERE in m/\N{U+100.1_0000_0000 <-- HERE }/ at - line 2.
########
# NAME \N{U+.}
my $p00="\\N{U+.}"; qr/$p00/;
@@ -63,6 +63,12 @@ my $p00="[\\x59\\N{U+.}]"; qr/$p00/ui;
EXPECT
Invalid hexadecimal number in \N{U+...} in regex; marked by <-- HERE in m/[\x59\N{U+. <-- HERE }]/ at - line 1.
########
+# NAME \N{U+...} leading underscore not allowed, medial is allowed
+my $p00='\N{U+FF_FF}'; qr/$p00/;
+$p00='\N{U+_FF}'; qr/$p00/;
+EXPECT
+Invalid hexadecimal number in \N{U+...} in regex; marked by <-- HERE in m/\N{U+_ <-- HERE FF}/ at - line 2.
+########
# NAME ${^RE_COMPILE_RECURSION_LIMIT} [perl #131551]
BEGIN { ${^RE_COMPILE_RECURSION_LIMIT} = ${^RE_COMPILE_RECURSION_LIMIT} = 2; }
qr/(a)/;
@@ -70,3 +76,111 @@ qr/((a))/;
EXPECT
Too many nested open parens in regex; marked by <-- HERE in m/(( <-- HERE a))/ at - line 3.
########
+# NAME \K not permitted in lookahead
+qr/(?=a\Ka)a/;
+EXPECT
+\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?=a\K <-- HERE a)a/ at - line 1.
+########
+# NAME \K not permitted in lookahead (alpha)
+no warnings 'experimental::alpha_assertions';
+qr/(*positive_lookahead:a\Ka)a/;
+EXPECT
+\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(*positive_lookahead:a\K <-- HERE a)a/ at - line 2.
+########
+# NAME \K not permitted in negative lookahead
+qr/(?!a\Ka)a/;
+EXPECT
+\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?!a\K <-- HERE a)a/ at - line 1.
+########
+# NAME \K not permitted in negative lookahead (alpha)
+no warnings 'experimental::alpha_assertions';
+qr/(*negative_lookahead:a\Ka)a/;
+EXPECT
+\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(*negative_lookahead:a\K <-- HERE a)a/ at - line 2.
+########
+# NAME \K not permitted in lookbehind
+qr/(?<=a\Ka)a/;
+EXPECT
+\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?<=a\K <-- HERE a)a/ at - line 1.
+########
+# NAME \K not permitted in lookbehind (alpha)
+no warnings 'experimental::alpha_assertions';
+qr/(*positive_lookbehind:a\Ka)a/;
+EXPECT
+\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(*positive_lookbehind:a\K <-- HERE a)a/ at - line 2.
+########
+# NAME \K not permitted in negative lookbehind
+qr/(?<!a\Ka)a/;
+EXPECT
+\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?<!a\K <-- HERE a)a/ at - line 1.
+########
+# NAME \K not permitted in negative lookbehind (alpha)
+no warnings 'experimental::alpha_assertions';
+qr/(*negative_lookbehind:a\Ka)a/;
+EXPECT
+\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(*negative_lookbehind:a\K <-- HERE a)a/ at - line 2.
+########
+# NAME \K nesting in lookahead after lookahead
+qr{(?=(?=x)x\K)x};
+EXPECT
+\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?=(?=x)x\K <-- HERE )x/ at - line 1.
+########
+# NAME \K nesting in lookahead after negative lookahead
+qr{(?=(?!y)x\K)x};
+EXPECT
+\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?=(?!y)x\K <-- HERE )x/ at - line 1.
+########
+# NAME \K nesting in lookahead in negative lookahead
+qr{(?=(?!y\K)x)x};
+EXPECT
+\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?=(?!y\K <-- HERE )x)x/ at - line 1.
+########
+# NAME \K nesting in lookahead in lookahead
+qr{(?=(?=x\K)x)x};
+EXPECT
+\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?=(?=x\K <-- HERE )x)x/ at - line 1.
+########
+# NAME \K nesting in lookbehind after lookbehind
+qr{(?<=(?<=x)x\K)x};
+EXPECT
+\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?<=(?<=x)x\K <-- HERE )x/ at - line 1.
+########
+# NAME \K nesting in lookahead after lookbehind
+qr{(?=(?<=x)x\K)x};
+EXPECT
+\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?=(?<=x)x\K <-- HERE )x/ at - line 1.
+########
+# NAME \K nesting in lookbehind after lookahead
+qr{(?<=(?=x)x\K)x};
+EXPECT
+\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?<=(?=x)x\K <-- HERE )x/ at - line 1.
+########
+# NAME \K nesting in negative lookbehind after lookahead
+qr{(?<!(?=x)x\K)x};
+EXPECT
+\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?<!(?=x)x\K <-- HERE )x/ at - line 1.
+########
+# NAME \K is permitted after the lookahead GH#18123
+qr/(?=(?=x)x)\K/;
+qr/(?!(?=x)x)\K/;
+qr/(?=(?!x)x)\K/;
+qr/(?!(?!x)x)\K/;
+qr/(?<=(?=x)x)\K/;
+qr/(?<!(?=x)x)\K/;
+qr/(?<=(?!x)x)\K/;
+qr/(?<!(?!x)x)\K/;
+qr/(?=(?<=x)x)\K/;
+qr/(?!(?<=x)x)\K/;
+qr/(?=(?<!x)x)\K/;
+qr/(?!(?<!x)x)\K/;
+qr/(?<=(?<=x)x)\K/;
+qr/(?<!(?<=x)x)\K/;
+qr/(?<=(?<!x)x)\K/;
+qr/(?<!(?<!x)x)\K/;
+EXPECT
+OPTIONS nonfatal
+########
+# NAME numeric parsing buffer overflow in numeric.c
+0=~/\p{nV:-0}/
+EXPECT
+Can't find Unicode property definition "nV:-0" in regex; marked by <-- HERE in m/\p{nV:-0} <-- HERE / at - line 1.
diff --git a/gnu/usr.bin/perl/t/lib/feature/bits b/gnu/usr.bin/perl/t/lib/feature/bits
new file mode 100644
index 00000000000..227f852c2c6
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/feature/bits
@@ -0,0 +1,45 @@
+Test specifically for things that cop_features broke
+
+__END__
+# NAME check clearing $^H clears the bits
+use feature 'say';
+BEGIN { %^H = () }
+say "Fail";
+EXPECT
+String found where operator expected at - line 3, near "say "Fail""
+ (Do you need to predeclare say?)
+syntax error at - line 3, near "say "Fail""
+Execution of - aborted due to compilation errors.
+########
+# NAME check copying $^H restores the bits
+use feature 'say';
+say "Hello";
+BEGIN { our %work = %^H; }
+no feature 'say';
+BEGIN { %^H = our %work }
+say "Goodbye";
+EXPECT
+Hello
+Goodbye
+########
+# NAME check deleting entries (via feature.pm) clears the bits
+use feature 'say';
+say "Hello";
+no feature 'say';
+say "Goodbye";
+EXPECT
+String found where operator expected at - line 4, near "say "Goodbye""
+ (Do you need to predeclare say?)
+syntax error at - line 4, near "say "Goodbye""
+Execution of - aborted due to compilation errors.
+########
+# NAME check deleting entries (bypass feature.pm) clears the bits
+use feature 'say';
+say "Hello";
+BEGIN { delete $^H{feature_say}; }
+say "Goodbye";
+EXPECT
+String found where operator expected at - line 4, near "say "Goodbye""
+ (Do you need to predeclare say?)
+syntax error at - line 4, near "say "Goodbye""
+Execution of - aborted due to compilation errors.
diff --git a/gnu/usr.bin/perl/t/lib/feature/indirect b/gnu/usr.bin/perl/t/lib/feature/indirect
new file mode 100644
index 00000000000..cd96f899b1c
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/feature/indirect
@@ -0,0 +1,141 @@
+Test no feature indirect.
+
+__END__
+# NAME feature indirect
+use feature 'say';
+package Foo {
+ sub new { bless {}, shift }
+}
+# various indirect object look-alikes
+my $foox = "foox";
+print STDERR "Hello\n";
+printf STDERR "Test%s\n", "x";
+say STDERR "Hello";
+exec $foox "foo", "bar";
+system $foox "foo", "bar";
+my $x = new Foo;
+no feature "indirect";
+print STDERR "Hello\n";
+printf STDERR "Test%s\n", "x";
+say STDERR "Hello";
+exec $foox "foo", "bar";
+system $foox "foo", "bar";
+my $y = new Foo;
+EXPECT
+OPTIONS fatal
+Bareword found where operator expected at - line 19, near "new Foo"
+ (Do you need to predeclare new?)
+syntax error at - line 19, near "new Foo"
+Execution of - aborted due to compilation errors.
+########
+# NAME METHOD BLOCK
+use feature 'say';
+package Foo {
+ sub new { bless {}, shift }
+}
+# make sure this works (either way)
+my $st = STDOUT;
+print { $st } "Foo\n";
+say { $st } "Foo";
+
+# make sure this continues to work by default
+my $class = "Foo";
+my $x = new { $class };
+
+use feature "indirect";
+
+# and with it explicitly enabled
+
+print { $st } "Foo\n";
+say { $st } "Foo";
+
+my $y = new { $class };
+
+
+no feature "indirect";
+
+# and only the indirect now fails
+print { $st } "Foo\n";
+say { $st } "Foo";
+my $z = new { $class };
+
+EXPECT
+OPTIONS fatal
+syntax error at - line 29, near "new { "
+Execution of - aborted due to compilation errors.
+########
+# NAME METHOD SCALAR
+use feature 'say';
+package Foo {
+ sub new { bless {}, shift }
+}
+# make sure this works (either way)
+my $st = STDOUT;
+print $st "Foo\n";
+say $st "Foo";
+
+# make sure this continues to work by default
+my $class = "Foo";
+my $x = new $class;
+
+use feature "indirect";
+
+# and with it explicitly enabled
+
+print $st "Foo\n";
+say $st "Foo";
+
+my $y = new $class;
+
+
+no feature "indirect";
+
+# and only the indirect now fails
+print $st "Foo\n";
+say $st "Foo";
+my $z = new $class;
+
+EXPECT
+OPTIONS fatal
+Scalar found where operator expected at - line 29, near "new $class"
+ (Do you need to predeclare new?)
+syntax error at - line 29, near "new $class"
+Execution of - aborted due to compilation errors.
+########
+# NAME FUNCMETH SCALAR
+use feature 'say';
+package Foo {
+ sub new { bless {}, shift }
+}
+# make sure this works (either way)
+my $st = STDOUT;
+print $st ("Foo\n");
+say $st ("Foo");
+
+# make sure this continues to work by default
+my $class = "Foo";
+my $x = new $class ();
+
+use feature "indirect";
+
+# and with it explicitly enabled
+
+print $st ("Foo\n");
+say $st ("Foo");
+
+my $y = new $class ();
+
+
+no feature "indirect";
+
+# and only the indirect now fails
+print $st ("Foo\n");
+say $st ("Foo");
+my $z = new $class ();
+
+EXPECT
+OPTIONS fatal
+Scalar found where operator expected at - line 29, near "new $class"
+ (Do you need to predeclare new?)
+syntax error at - line 29, near "new $class "
+Execution of - aborted due to compilation errors.
diff --git a/gnu/usr.bin/perl/t/lib/warnings/gv b/gnu/usr.bin/perl/t/lib/warnings/gv
index 2a2dcf45470..2caf2d36b58 100644
--- a/gnu/usr.bin/perl/t/lib/warnings/gv
+++ b/gnu/usr.bin/perl/t/lib/warnings/gv
@@ -16,7 +16,6 @@ __END__
use warnings 'syntax' ;
@ISA = qw(Fred); joe()
EXPECT
-Can't locate package Fred for @main::ISA at - line 3.
Undefined subroutine &main::joe called at - line 3.
########
# gv.c
@@ -26,6 +25,86 @@ EXPECT
Undefined subroutine &main::joe called at - line 3.
########
# gv.c
+use warnings 'syntax' ;
+@ISA = qw(Fred); __PACKAGE__->joe()
+EXPECT
+While trying to resolve method call main->joe() can not locate package "Fred" yet it is mentioned in @main::ISA (perhaps you forgot to load "Fred"?) at - line 3.
+Can't locate object method "joe" via package "main" at - line 3.
+########
+# gv.c
+no warnings 'syntax' ;
+@ISA = qw(Fred); __PACKAGE__->joe()
+EXPECT
+Can't locate object method "joe" via package "main" at - line 3.
+########
+# gv.c
+use warnings 'syntax' ;
+{
+ package AA; # this is a deliberate error
+# package A; # should be this
+ sub foo {
+ print STDERR "I'm in A's foo\n";
+ }
+}
+{
+ package B;
+ sub foo {
+ print STDERR "I'm in B's foo\n";
+ }
+}
+@C::ISA = qw(A B);
+$a = bless [], 'C';
+$a->foo();
+__END__
+EXPECT
+While trying to resolve method call C->foo() can not locate package "A" yet it is mentioned in @C::ISA (perhaps you forgot to load "A"?) at - line 18.
+I'm in B's foo
+########
+# gv.c
+no warnings 'syntax' ;
+{
+ package AA; # this is a deliberate error
+# package A; # should be this
+ sub foo {
+ print STDERR "I'm in A's foo\n";
+ }
+}
+{
+ package B;
+ sub foo {
+ print STDERR "I'm in B's foo\n";
+ }
+}
+@C::ISA = qw(A B);
+$a = bless [], 'C';
+$a->foo();
+__END__
+EXPECT
+I'm in B's foo
+########
+# gv.c
+use warnings 'syntax' ;
+{
+# package AA; # this would be an error
+ package A; # the right thing
+ sub foo {
+ print STDERR "I'm in A's foo\n";
+ }
+}
+{
+ package B;
+ sub foo {
+ print STDERR "I'm in B's foo\n";
+ }
+}
+@C::ISA = qw(A B);
+$a = bless [], 'C';
+$a->foo();
+__END__
+EXPECT
+I'm in A's foo
+########
+# gv.c
$a = ${^ENCODING};
$a = ${^E_NCODING};
${^E_NCODING} = 1; # We pretend this variable never existed.
@@ -38,7 +117,6 @@ use open qw( :utf8 :std );
package ï¼¹;
@ISA = qw(Fred); joe()
EXPECT
-Can't locate package Fred for @ï¼¹::ISA at - line 6.
Undefined subroutine &ï¼¹::joe called at - line 6.
########
# gv.c
diff --git a/gnu/usr.bin/perl/t/op/caller.pl b/gnu/usr.bin/perl/t/op/caller.pl
index bf2afe974d0..25fe4af6553 100644
--- a/gnu/usr.bin/perl/t/op/caller.pl
+++ b/gnu/usr.bin/perl/t/op/caller.pl
@@ -140,7 +140,7 @@ EOE
if ($::testing_caller) {
# Perl_refcounted_he_fetch() insists that you have the key correctly
# normalised for the way hashes store them. As this one isn't
- # normalised down to bytes, it won't t work with
+ # normalised down to bytes, it won't work with
# Perl_refcounted_he_fetch()
is(hint_fetch($k2), 2, "UTF-8 or not, it's the same");
}
diff --git a/gnu/usr.bin/perl/t/op/cmpchain.t b/gnu/usr.bin/perl/t/op/cmpchain.t
new file mode 100644
index 00000000000..236d5f9a830
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/cmpchain.t
@@ -0,0 +1,173 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ require "./test.pl";
+ set_up_inc("../lib");
+}
+
+use feature "isa";
+no warnings qw(experimental::smartmatch experimental::isa);
+
+my @cheqop = qw(== != eq ne);
+my @nceqop = qw(<=> cmp ~~);
+my @chrelop = qw(< > <= >= lt gt le ge);
+my @ncrelop = qw(isa);
+
+foreach my $c0 (@nceqop) {
+ foreach my $c1 (@nceqop) {
+ is eval("sub { \$a $c0 \$b $c1 \$c }"), undef,
+ "$c0 $c1 non-associative";
+ }
+}
+foreach my $c (@nceqop) {
+ foreach my $e (@cheqop) {
+ is eval("sub { \$a $c \$b $e \$c }"), undef, "$c $e non-associative";
+ is eval("sub { \$a $e \$b $c \$c }"), undef, "$e $c non-associative";
+ }
+}
+foreach my $c (@nceqop) {
+ foreach my $e0 (@cheqop) {
+ foreach my $e1 (@cheqop) {
+ is eval("sub { \$a $c \$b $e0 \$c $e1 \$d }"), undef,
+ "$c $e0 $e1 non-associative";
+ is eval("sub { \$a $e0 \$b $e1 \$c $c \$d }"), undef,
+ "$e0 $e1 $c non-associative";
+ }
+ }
+}
+
+foreach my $c0 (@ncrelop) {
+ foreach my $c1 (@ncrelop) {
+ is eval("sub { \$a $c0 \$b $c1 \$c }"), undef,
+ "$c0 $c1 non-associative";
+ }
+}
+foreach my $c (@ncrelop) {
+ foreach my $e (@chrelop) {
+ is eval("sub { \$a $c \$b $e \$c }"), undef, "$c $e non-associative";
+ is eval("sub { \$a $e \$b $c \$c }"), undef, "$e $c non-associative";
+ }
+}
+foreach my $c (@ncrelop) {
+ foreach my $e0 (@chrelop) {
+ foreach my $e1 (@chrelop) {
+ is eval("sub { \$a $c \$b $e0 \$c $e1 \$d }"), undef,
+ "$c $e0 $e1 non-associative";
+ is eval("sub { \$a $e0 \$b $e1 \$c $c \$d }"), undef,
+ "$e0 $e1 $c non-associative";
+ }
+ }
+}
+
+foreach my $e0 (@cheqop) {
+ foreach my $e1 (@cheqop) {
+ isnt eval("sub { \$a $e0 \$b $e1 \$c }"), undef, "$e0 $e1 legal";
+ }
+}
+foreach my $r0 (@chrelop) {
+ foreach my $r1 (@chrelop) {
+ isnt eval("sub { \$a $r0 \$b $r1 \$c }"), undef, "$r0 $r1 legal";
+ }
+}
+foreach my $e0 (@cheqop) {
+ foreach my $e1 (@cheqop) {
+ foreach my $e2 (@cheqop) {
+ isnt eval("sub { \$a $e0 \$b $e1 \$c $e2 \$d }"), undef,
+ "$e0 $e1 $e2 legal";
+ }
+ }
+}
+foreach my $r0 (@chrelop) {
+ foreach my $r1 (@chrelop) {
+ foreach my $r2 (@chrelop) {
+ isnt eval("sub { \$a $r0 \$b $r1 \$c $r2 \$d }"), undef,
+ "$r0 $r1 $r2 legal";
+ }
+ }
+}
+
+foreach(
+ [5,3,2], [5,3,3], [5,3,4], [5,3,5], [5,3,6],
+ [5,5,4], [5,5,5], [5,5,6],
+ [5,7,4], [5,7,5], [5,7,6], [5,7,7], [5,7,8],
+) {
+ is join(",", "x", $_->[0] == $_->[1] != $_->[2], "y"),
+ join(",", "x", !!($_->[0] == $_->[1] && $_->[1] != $_->[2]), "y"),
+ "$_->[0] == $_->[1] != $_->[2]";
+ is join(",", "x", $_->[0] != $_->[1] == $_->[2], "y"),
+ join(",", "x", !!($_->[0] != $_->[1] && $_->[1] == $_->[2]), "y"),
+ "$_->[0] != $_->[1] == $_->[2]";
+ is join(",", "x", $_->[0] < $_->[1] <= $_->[2], "y"),
+ join(",", "x", !!($_->[0] < $_->[1] && $_->[1] <= $_->[2]), "y"),
+ "$_->[0] < $_->[1] <= $_->[2]";
+ is join(",", "x", $_->[0] > $_->[1] >= $_->[2], "y"),
+ join(",", "x", !!($_->[0] > $_->[1] && $_->[1] >= $_->[2]), "y"),
+ "$_->[0] > $_->[1] >= $_->[2]";
+ is join(",", "x", $_->[0] < $_->[1] > $_->[2], "y"),
+ join(",", "x", !!($_->[0] < $_->[1] && $_->[1] > $_->[2]), "y"),
+ "$_->[0] < $_->[1] > $_->[2]";
+ my $e = "";
+ is join(",", "x",
+ ($e .= "a", $_->[0]) == ($e .= "b", $_->[1]) !=
+ ($e .= "c", $_->[2]),
+ "y"),
+ join(",", "x", !!($_->[0] == $_->[1] && $_->[1] != $_->[2]), "y"),
+ "$_->[0] == $_->[1] != $_->[2] with side effects";
+ is $e, "ab".($_->[0] == $_->[1] ? "c" : ""), "operand evaluation order";
+ $e = "";
+ is join(",", "x",
+ ($e .= "a", $_->[0]) < ($e .= "b", $_->[1]) <= ($e .= "c", $_->[2]),
+ "y"),
+ join(",", "x", !!($_->[0] < $_->[1] && $_->[1] <= $_->[2]), "y"),
+ "$_->[0] < $_->[1] <= $_->[2] with side effects";
+ is $e, "ab".($_->[0] < $_->[1] ? "c" : ""), "operand evaluation order";
+ foreach my $p (1..9) {
+ is join(",", "x", $_->[0] == $_->[1] != $_->[2] == $p, "y"),
+ join(",", "x",
+ !!($_->[0] == $_->[1] && $_->[1] != $_->[2] && $_->[2] == $p),
+ "y"),
+ "$_->[0] == $_->[1] != $_->[2] == $p";
+ is join(",", "x", $_->[0] < $_->[1] <= $_->[2] > $p, "y"),
+ join(",", "x",
+ !!($_->[0] < $_->[1] && $_->[1] <= $_->[2] && $_->[2] > $p),
+ "y"),
+ "$_->[0] < $_->[1] <= $_->[2] > $p";
+ $e = "";
+ is join(",", "x",
+ ($e .= "a", $_->[0]) == ($e .= "b", $_->[1]) !=
+ ($e .= "c", $_->[2]) == ($e .= "d", $p),
+ "y"),
+ join(",", "x",
+ !!($_->[0] == $_->[1] && $_->[1] != $_->[2] && $_->[2] == $p),
+ "y"),
+ "$_->[0] == $_->[1] != $_->[2] == $p with side effects";
+ is $e,
+ "ab".($_->[0] == $_->[1] ?
+ ("c".($_->[1] != $_->[2] ? "d" : "")) : ""),
+ "operand evaluation order";
+ $e = "";
+ is join(",", "x",
+ ($e .= "a", $_->[0]) < ($e .= "b", $_->[1]) <=
+ ($e .= "c", $_->[2]) > ($e .= "d", $p),
+ "y"),
+ join(",", "x",
+ !!($_->[0] < $_->[1] && $_->[1] <= $_->[2] && $_->[2] > $p),
+ "y"),
+ "$_->[0] < $_->[1] <= $_->[2] > $p with side effects";
+ is $e,
+ "ab".($_->[0] < $_->[1] ?
+ ("c".($_->[1] <= $_->[2] ? "d" : "")) : ""),
+ "operand evaluation order";
+ }
+}
+
+# https://github.com/Perl/perl5/issues/18380
+fresh_perl_is(<<'CODE', "", {}, "stack underflow");
+no warnings "uninitialized";
+my $v;
+1 < $v < 2;
+2 < $v < 3;
+CODE
+
+done_testing();
diff --git a/gnu/usr.bin/perl/t/op/isa.t b/gnu/usr.bin/perl/t/op/isa.t
new file mode 100644
index 00000000000..96a9c2139ec
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/isa.t
@@ -0,0 +1,49 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ require './test.pl';
+ set_up_inc('../lib');
+ require Config;
+}
+
+use strict;
+use feature 'isa';
+no warnings 'experimental::isa';
+
+plan 11;
+
+package BaseClass {}
+package DerivedClass { our @ISA = qw(BaseClass) }
+package CustomClass {
+ sub isa { length($_[1]) == 9; }
+}
+
+my $baseobj = bless {}, "BaseClass";
+my $derivedobj = bless {}, "DerivedClass";
+my $customobj = bless {}, "CustomClass";
+
+# Bareword package name
+ok($baseobj isa BaseClass, '$baseobj isa BaseClass');
+ok(not($baseobj isa Another::Class), '$baseobj is not Another::Class');
+
+# String package name
+ok($baseobj isa "BaseClass", '$baseobj isa BaseClass');
+ok(not($baseobj isa "DerivedClass"), '$baseobj is not DerivedClass');
+
+ok($derivedobj isa "DerivedClass", '$derivedobj isa DerivedClass');
+ok($derivedobj isa "BaseClass", '$derivedobj isa BaseClass');
+
+# Expression giving a package name
+my $classname = "DerivedClass";
+ok($derivedobj isa $classname, '$derivedobj isa DerivedClass via SV');
+
+# Invoked on instance which overrides ->isa
+ok($customobj isa "Something", '$customobj isa Something');
+ok(not($customobj isa "SomethingElse"), '$customobj isa SomethingElse');
+
+ok(not(undef isa "BaseClass"), 'undef is not BaseClass');
+ok(not([] isa "BaseClass"), 'ARRAYref is not BaseClass');
+
+# TODO: Consider
+# LHS = other class
diff --git a/gnu/usr.bin/perl/t/op/lfs.t b/gnu/usr.bin/perl/t/op/lfs.t
index 1ddfd13ccdd..c53a9eb82fa 100644
--- a/gnu/usr.bin/perl/t/op/lfs.t
+++ b/gnu/usr.bin/perl/t/op/lfs.t
@@ -134,7 +134,7 @@ if ($r or not seek(BIG, 5_000_000_000, SEEK_SET)) {
}
# Either the print or (more likely, thanks to buffering) the close will
-# fail if there are are filesize limitations (process or fs).
+# fail if there are filesize limitations (process or fs).
my $print = print BIG "big";
print "# print failed: $!\n" unless $print;
my $close = close BIG;
diff --git a/gnu/usr.bin/perl/t/op/signame_canonical.t b/gnu/usr.bin/perl/t/op/signame_canonical.t
new file mode 100644
index 00000000000..241b57a5f47
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/signame_canonical.t
@@ -0,0 +1,75 @@
+#!perl -w
+
+# We assume that TestInit has been used.
+
+BEGIN {
+ chdir 't' if -d 't';
+ require './test.pl';
+ skip_all_if_miniperl();
+}
+
+use strict;
+use warnings;
+
+use Config;
+use Data::Dumper;
+$Data::Dumper::Sortkeys = 1;
+
+# Windows doesn't seem to be able to test signals.
+skip_all("Signals lock up tests on $^O") if $^O =~ /MSWin32/;
+
+$| = 1;
+
+# Extract the signals from %Config.
+my @SIGNAMES = split /\s+/, $Config{sig_name};
+my @SIGNUMS = split /\s+/, $Config{sig_num};
+
+my %SIG_MAP;
+foreach my $i ( 0 .. ( scalar @SIGNAMES - 1 ) ) {
+ $SIG_MAP{ $SIGNAMES[$i] } = $SIGNUMS[$i];
+}
+
+# Find the canonical (first) signal names.
+my %CANONICAL_SIG;
+my @duplicate_signals;
+foreach my $sig (@SIGNAMES) {
+ my $signum = $SIG_MAP{$sig};
+ $CANONICAL_SIG{$signum} //= $sig;
+ push @duplicate_signals, $sig if $CANONICAL_SIG{$signum} ne $sig;
+}
+
+plan tests => scalar @duplicate_signals * 5;
+watchdog(25);
+
+# Define the duplicate signal handlers.
+my $sent = '';
+
+sub handler_is {
+ my $signame = shift;
+ my $signum = $SIG_MAP{$signame};
+
+ my $canonical = $CANONICAL_SIG{$signum};
+
+ is( $signame, $canonical, "Signal name for $sent is recieved as the canonical '$canonical' name." );
+
+ return;
+}
+
+foreach my $dupe (@duplicate_signals) {
+ my $canonical_name = $CANONICAL_SIG{ $SIG_MAP{$dupe} };
+ note "Testing $dupe / $canonical_name signal pair";
+ {
+ local $SIG{$dupe} = \&handler_is;
+ is( $SIG{$dupe}, $SIG{$canonical_name}, "Both handlers for $canonical_name/$dupe are set" );
+
+ $sent = $dupe;
+ kill $dupe, $$;
+
+ $sent = $canonical_name;
+ kill $canonical_name, $$;
+ }
+
+ is( $SIG{$dupe}, undef, "The signal $dupe is cleared after local goes out of scope." );
+ is( $SIG{$canonical_name}, undef, "The signal $canonical_name is cleared after local goes out of scope." );
+}
+
diff --git a/gnu/usr.bin/perl/t/op/tr_latin1.t b/gnu/usr.bin/perl/t/op/tr_latin1.t
index e01477c422f..9d08652aaf3 100644
--- a/gnu/usr.bin/perl/t/op/tr_latin1.t
+++ b/gnu/usr.bin/perl/t/op/tr_latin1.t
@@ -3,10 +3,11 @@
BEGIN {
chdir 't' if -d 't';
require './test.pl';
+ skip_all('ASCII sensitive') if $::IS_EBCDIC;
set_up_inc('../lib');
}
-plan tests => 1;
+plan tests => 2;
{ # This test is malloc senstive. Right now on some platforms anyway, space
# for the final \xff needs to be mallocd, and that's what caused the
@@ -17,4 +18,9 @@ plan tests => 1;
}
+{ # gh#17277. This caused errors with valgrind and asan
+ fresh_perl_is('no warnings qw(void uninitialized); s~~00~-y~Ë0~\x{E00}~',
+ "", {}, 'gh#17227');
+}
+
1;
diff --git a/gnu/usr.bin/perl/t/porting/authors.t b/gnu/usr.bin/perl/t/porting/authors.t
index 0102e93befa..0172b7cdcc0 100644
--- a/gnu/usr.bin/perl/t/porting/authors.t
+++ b/gnu/usr.bin/perl/t/porting/authors.t
@@ -24,8 +24,19 @@ if ( $ENV{TRAVIS} && defined $ENV{TRAVIS_COMMIT_RANGE} ) {
# all the more a pull request should not be impacted by blead being incorrect
$revision_range = $ENV{TRAVIS_COMMIT_RANGE};
}
+elsif( $ENV{GITHUB_ACTIONS} && length $ENV{GITHUB_BASE_REF} ) {
+ # Same as above, except for GitHub Actions
+ # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/using-environment-variables
+
+ # This hardcoded origin/ isn't great, but I'm not sure how to better fix it
+ my $common_ancestor = `git merge-base "origin/$ENV{GITHUB_BASE_REF}" "HEAD~2" 2>/dev/null`;
+
+ chomp($common_ancestor);
+
+ $revision_range = "${common_ancestor}..HEAD" if length $common_ancestor
+}
# This is the subset of "pretty=fuller" that checkAUTHORS.pl actually needs:
-print qx{git log --pretty=format:"Author: %an <%ae>" $revision_range | $^X Porting/checkAUTHORS.pl --tap -};
+print qx{git log --no-merges --pretty=format:"Author: %an <%ae>" $revision_range | $^X Porting/checkAUTHORS.pl --tap -};
# EOF
diff --git a/gnu/usr.bin/perl/t/porting/extrefs.t b/gnu/usr.bin/perl/t/porting/extrefs.t
index f8cb6acd3bf..d898b49b426 100644
--- a/gnu/usr.bin/perl/t/porting/extrefs.t
+++ b/gnu/usr.bin/perl/t/porting/extrefs.t
@@ -6,7 +6,7 @@
# code on CPAN, and can break cflags.SH.
#
# Why do we test this?
-# See https://rt.perl.org/rt3/Ticket/Display.html?id=116989
+# See https://github.com/Perl/perl5/issues/12824
#
# It's broken - how do I fix it?
# You added an initializer or static function to a header file that
diff --git a/gnu/usr.bin/perl/t/porting/test_bootstrap.t b/gnu/usr.bin/perl/t/porting/test_bootstrap.t
index 03a9a8ce831..53b31b8afbc 100755
--- a/gnu/usr.bin/perl/t/porting/test_bootstrap.t
+++ b/gnu/usr.bin/perl/t/porting/test_bootstrap.t
@@ -1,9 +1,8 @@
#!/perl -w
use strict;
-# See "Writing a test" in perlhack.pod for the instructions about the order that
-# testing directories run, and which constructions should be avoided in the
-# early tests.
+# See "TESTING" in perlhack.pod for the instructions about where test files
+# are located and which constructions should be avoided in the early tests.
# This regression tests ensures that the rules aren't accidentally overlooked.
@@ -36,8 +35,13 @@ while (my $file = <$fh>) {
# avoid PERL_UNICODE causing us to read non-UTF-8 files as UTF-8
binmode $t;
my $contents = <$t>;
- # Make sure that we don't match ourselves
- unlike($contents, qr/use\s+Test::More/, "$file doesn't use Test::\QMore");
+ # Don't 'use' Test::* modules under 't/' --
+ # but exclude this file from that test.
+ unlike(
+ $contents,
+ qr/use\s+Test::(?:Simple|More)/,
+ "$file doesn't use Test::Simple or Test::More"
+ ) unless ($file =~ m|porting/test_bootstrap\.t|);
next unless $file =~ m!^base/! or $file =~ m!^comp!;
# Remove only the excepted constructions for the specific files.
diff --git a/gnu/usr.bin/perl/t/re/anyof.t b/gnu/usr.bin/perl/t/re/anyof.t
index d33cbb2abea..6cc34efd2bd 100644
--- a/gnu/usr.bin/perl/t/re/anyof.t
+++ b/gnu/usr.bin/perl/t/re/anyof.t
@@ -35,13 +35,15 @@ BEGIN {
# NOTE: If the pattern contains (?8) it will be upgraded to UTF-8 after
# stripping that
-# 2**32-1 or 2**64-1
-my $highest_cp_string = "F" x (($Config{uvsize} < 8) ? 8 : 16);
+use Unicode::UCD;
+my $highest_cp = $Unicode::UCD::MAX_CP;
+my $highest_cp_string = sprintf "%X", $highest_cp;
+$highest_cp_string = "$highest_cp_string";
-my $next_highest_cp_string = $highest_cp_string =~ s/ F $ /E/xr;
-
-my $highest_cp = "\\x{$highest_cp_string}";
-my $next_highest_cp = "\\x{$next_highest_cp_string}";
+my $infinity = $highest_cp_string;
+$infinity =~ s/^7/F/; # Make infinity larger than the largest legal one, and
+ # at the time of this writing, we really internally
+ # allow UV_MAX to be infinity.
sub get_compiled ($) {
# Convert platform-independent values to what is suitable for the
@@ -49,8 +51,8 @@ sub get_compiled ($) {
my $pattern = shift;
- $pattern =~ s/\{INFTY\}/$highest_cp/g;
- $pattern =~ s/\{INFTY_minus_1\}/$next_highest_cp/g;
+ $pattern =~ s/{INFTY}/\\x{$infinity}/g;
+ $pattern =~ s/{HIGHEST_CP}/\\x{$highest_cp_string}/g;
my $use_utf8 = ($pattern =~ s/\Q(?8)//);
$pattern = "my \$a = '$pattern';";
@@ -60,7 +62,7 @@ sub get_compiled ($) {
my $result = fresh_perl($actual_pattern);
if ($? != 0) { # Re-run so as to display STDERR.
- fail($pattern);
+ fail($pattern, "Until this is fixed, the planned number of tests will be wrong");
fresh_perl($actual_pattern, { stderr => 0, verbose => 1 });
return;
}
@@ -78,8 +80,8 @@ sub get_compiled ($) {
s/ ^ \s* \d+ : \s* //x; # ... And the node number
# Use platform-independent values
- s/$highest_cp_string/INFTY/g;
- s/$next_highest_cp_string/INFTY_minus_1/g;
+ s/$infinity/INFTY/ig;
+ s/$highest_cp_string/HIGHEST_CP/ig;
return $_;
}
@@ -137,8 +139,10 @@ my @tests = (
'[_[:^blank:]]' => 'NPOSIXD[:blank:]',
'[\xA0[:^blank:]]' => 'ANYOF[^\t ][0100-167F 1681-1FFF 200B-202E 2030-205E 2060-2FFF 3001-INFTY]',
'(?d:[_[:^blank:]])' => 'NPOSIXD[:blank:]',
- '[\x{07}-\x{0B}]' => 'ANYOF[\a\b\t\n\x0B]',
- '(?il)[\x{212A}]' => 'ANYOFL{i}[{utf8 locale}Kk][212A]',
+ '[\x{07}-\x{0B}]' => 'ANYOFR[\a\b\t\n\x0B]',
+ '(?l)[\x{2029}]' => 'EXACTL <\x{2029}>',
+ '(?l)(?[\x{2029}])' => 'ANYOFL{utf8-locale-reqd}[2029]', # regex sets requires utf8 locale for /l
+ '(?il)[\x{212A}]' => 'EXACTFL <\\x{212a}>',
'(?il)(?[\x{212A}])' => 'ANYOFL{utf8-locale-reqd}[Kk][212A]',
'(?i)b[s]\xe0' => 'ANYOFM[Bb]', # The s goes into a 2nd node
@@ -459,11 +463,12 @@ my @tests = (
'(?i)(?u)[\D\w]' => 'SANY',
'(?i)(?a)[\d\w]' => 'POSIXA[\w]',
'(?i)(?a)[\D\w]' => 'SANY',
- '(?l:[\x{212A}])' => 'ANYOFL[212A]',
+ '(?l:[\x{212A}])' => 'EXACTL <\x{212a}>',
'(?l:[\s\x{212A}])' => 'ANYOFPOSIXL[\s][1680 2000-200A 2028-2029 202F 205F 212A 3000]',
'(?l:[^\S\x{202F}])' => 'ANYOFPOSIXL[^\\S][1680 2000-200A 2028-2029 205F 3000]',
- '(?li:[a-z])' => 'ANYOFL{i}[a-z{utf8 locale}\x{017F}\x{212A}]',
-
+ '(?li:[a-z])' => (($::IS_ASCII)
+ ? 'ANYOFL{i}[a-z{utf8 locale}\x{017F}\x{212A}]'
+ : 'ANYOFL{i}[a-ij-rs-z{utf8 locale}\x{017F}\x{212A}]'),
'\p{All}' => 'SANY',
'\P{All}' => 'OPFAIL',
'[\p{Any}]' => 'ANYOF[\x00-\xFF][0100-10FFFF]',
@@ -476,163 +481,157 @@ my @tests = (
'[^\p{All}\p{IsMyRuntimeProperty}]' => 'OPFAIL',
'[\p{All}\p{IsMyRuntimeProperty}]' => 'SANY',
- '[\x{00}-{INFTY_minus_1}]' => 'ANYOF[\x00-\xFF][0100-INFTY_minus_1]',
+ '[\x{00}-{HIGHEST_CP}]' => 'ANYOF[\x00-\xFF][0100-HIGHEST_CP]',
'[\x{00}-{INFTY}]' => 'SANY',
- '(?i)[\x{100}]' => 'ANYOFH[0100-0101]',
'[\x{101}-{INFTY}]' => 'ANYOFH[0101-INFTY]',
- '[\x{101}-{INFTY_minus_1}]' => 'ANYOFH[0101-INFTY_minus_1]',
- '[\x{102}\x{104}]' => 'ANYOFH[0102 0104]',
- '[\x{102}-\x{104}{INFTY}]' => 'ANYOFH[0102-0104 INFTY-INFTY]',
- '[\x{102}-\x{104}{INFTY_minus_1}]' => 'ANYOFH[0102-0104 INFTY_minus_1]',
- '[\x{102}-\x{104}\x{101}]' => 'ANYOFH[0101-0104]',
+ '[\x{101}-{HIGHEST_CP}]' => 'ANYOFH[0101-HIGHEST_CP]',
+ '[\x{102}\x{104}]' => 'ANYOFHb[0102 0104]',
+ '[\x{102}-\x{104}{HIGHEST_CP}]' => 'ANYOFH[0102-0104 HIGHEST_CP]',
+ '[\x{102}-\x{104}\x{101}]' => 'ANYOFRb[0101-0104]',
'[\x{102}-\x{104}\x{101}-{INFTY}]' => 'ANYOFH[0101-INFTY]',
- '[\x{102}-\x{104}\x{101}-{INFTY_minus_1}]' => 'ANYOFH[0101-INFTY_minus_1]',
- '[\x{102}-\x{104}\x{102}]' => 'ANYOFH[0102-0104]',
+ '[\x{102}-\x{104}\x{101}-{HIGHEST_CP}]' => 'ANYOFH[0101-HIGHEST_CP]',
+ '[\x{102}-\x{104}\x{102}]' => 'ANYOFRb[0102-0104]',
'[\x{102}-\x{104}\x{102}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
- '[\x{102}-\x{104}\x{102}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY_minus_1]',
- '[\x{102}-\x{104}\x{103}]' => 'ANYOFH[0102-0104]',
+ '[\x{102}-\x{104}\x{102}-{HIGHEST_CP}]' => 'ANYOFH[0102-HIGHEST_CP]',
+ '[\x{102}-\x{104}\x{103}]' => 'ANYOFRb[0102-0104]',
'[\x{102}-\x{104}\x{103}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
- '[\x{102}-\x{104}\x{103}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY_minus_1]',
- '[\x{102}-\x{104}\x{104}]' => 'ANYOFH[0102-0104]',
+ '[\x{102}-\x{104}\x{103}-{HIGHEST_CP}]' => 'ANYOFH[0102-HIGHEST_CP]',
+ '[\x{102}-\x{104}\x{104}]' => 'ANYOFRb[0102-0104]',
'[\x{102}-\x{104}\x{104}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
- '[\x{102}-\x{104}\x{104}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY_minus_1]',
- '[\x{102}-\x{104}\x{105}]' => 'ANYOFH[0102-0105]',
+ '[\x{102}-\x{104}\x{104}-{HIGHEST_CP}]' => 'ANYOFH[0102-HIGHEST_CP]',
+ '[\x{102}-\x{104}\x{105}]' => 'ANYOFRb[0102-0105]',
'[\x{102}-\x{104}\x{105}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
- '[\x{102}-\x{104}\x{105}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY_minus_1]',
- '[\x{102}-\x{104}\x{106}]' => 'ANYOFH[0102-0104 0106]',
+ '[\x{102}-\x{104}\x{105}-{HIGHEST_CP}]' => 'ANYOFH[0102-HIGHEST_CP]',
+ '[\x{102}-\x{104}\x{106}]' => 'ANYOFHb[0102-0104 0106]',
'[\x{102}-\x{104}\x{106}-{INFTY}]' => 'ANYOFH[0102-0104 0106-INFTY]',
- '[\x{102}-\x{104}\x{106}-{INFTY_minus_1}]' => 'ANYOFH[0102-0104 0106-INFTY_minus_1]',
- '[\x{102}-\x{104}\x{108}-\x{10A}{INFTY}]' => 'ANYOFH[0102-0104 0108-010A INFTY-INFTY]',
- '[\x{102}-\x{104}\x{108}-\x{10A}{INFTY_minus_1}]' => 'ANYOFH[0102-0104 0108-010A INFTY_minus_1]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}]' => 'ANYOFH[0101-0104 0108-010A]',
+ '[\x{102}-\x{104}\x{106}-{HIGHEST_CP}]' => 'ANYOFH[0102-0104 0106-HIGHEST_CP]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}{HIGHEST_CP}]' => 'ANYOFH[0102-0104 0108-010A HIGHEST_CP]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}]' => 'ANYOFHb[0101-0104 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{INFTY}]' => 'ANYOFH[0101-INFTY]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{INFTY_minus_1}]' => 'ANYOFH[0101-INFTY_minus_1]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{102}]' => 'ANYOFH[0101-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{103}]' => 'ANYOFH[0101-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{104}]' => 'ANYOFH[0101-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{105}]' => 'ANYOFH[0101-0105 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{106}]' => 'ANYOFH[0101-0106 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{107}]' => 'ANYOFH[0101-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{108}]' => 'ANYOFH[0101-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{109}]' => 'ANYOFH[0101-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10A}]' => 'ANYOFH[0101-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10B}]' => 'ANYOFH[0101-010B]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}]' => 'ANYOFH[0102-0104 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{HIGHEST_CP}]' => 'ANYOFH[0101-HIGHEST_CP]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{102}]' => 'ANYOFHb[0101-0104 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{103}]' => 'ANYOFHb[0101-0104 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{104}]' => 'ANYOFHb[0101-0104 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{105}]' => 'ANYOFHb[0101-0105 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{106}]' => 'ANYOFHb[0101-0106 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{107}]' => 'ANYOFRb[0101-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{108}]' => 'ANYOFRb[0101-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{109}]' => 'ANYOFRb[0101-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10A}]' => 'ANYOFRb[0101-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10B}]' => 'ANYOFRb[0101-010B]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}]' => 'ANYOFHb[0102-0104 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY_minus_1]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{102}]' => 'ANYOFH[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{103}]' => 'ANYOFH[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{104}]' => 'ANYOFH[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{105}]' => 'ANYOFH[0102-0105 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{106}]' => 'ANYOFH[0102-0106 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{107}]' => 'ANYOFH[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{108}]' => 'ANYOFH[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{109}]' => 'ANYOFH[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10A}]' => 'ANYOFH[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10B}]' => 'ANYOFH[0102-010B]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10C}]' => 'ANYOFH[0102-010C]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}]' => 'ANYOFH[0102-0104 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{HIGHEST_CP}]' => 'ANYOFH[0102-HIGHEST_CP]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{102}]' => 'ANYOFHb[0102-0104 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{103}]' => 'ANYOFHb[0102-0104 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{104}]' => 'ANYOFHb[0102-0104 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{105}]' => 'ANYOFHb[0102-0105 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{106}]' => 'ANYOFHb[0102-0106 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{107}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{108}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{109}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10A}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10B}]' => 'ANYOFRb[0102-010B]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10C}]' => 'ANYOFRb[0102-010C]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}]' => 'ANYOFHb[0102-0104 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY_minus_1]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{104}]' => 'ANYOFH[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{105}]' => 'ANYOFH[0102-0105 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{106}]' => 'ANYOFH[0102-0106 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{107}]' => 'ANYOFH[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{108}]' => 'ANYOFH[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{109}]' => 'ANYOFH[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10A}]' => 'ANYOFH[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10B}]' => 'ANYOFH[0102-010B]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10C}]' => 'ANYOFH[0102-010C]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}]' => 'ANYOFH[0102-0104 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{HIGHEST_CP}]' => 'ANYOFH[0102-HIGHEST_CP]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{104}]' => 'ANYOFHb[0102-0104 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{105}]' => 'ANYOFHb[0102-0105 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{106}]' => 'ANYOFHb[0102-0106 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{107}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{108}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{109}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10A}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10B}]' => 'ANYOFRb[0102-010B]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10C}]' => 'ANYOFRb[0102-010C]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}]' => 'ANYOFHb[0102-0104 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY_minus_1]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{105}]' => 'ANYOFH[0102-0105 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{106}]' => 'ANYOFH[0102-0106 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{107}]' => 'ANYOFH[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{108}]' => 'ANYOFH[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{109}]' => 'ANYOFH[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10A}]' => 'ANYOFH[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10B}]' => 'ANYOFH[0102-010B]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10C}]' => 'ANYOFH[0102-010C]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}]' => 'ANYOFH[0102-0105 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{HIGHEST_CP}]' => 'ANYOFH[0102-HIGHEST_CP]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{105}]' => 'ANYOFHb[0102-0105 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{106}]' => 'ANYOFHb[0102-0106 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{107}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{108}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{109}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10A}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10B}]' => 'ANYOFRb[0102-010B]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10C}]' => 'ANYOFRb[0102-010C]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}]' => 'ANYOFHb[0102-0105 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY_minus_1]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{106}]' => 'ANYOFH[0102-0106 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{107}]' => 'ANYOFH[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{108}]' => 'ANYOFH[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{109}]' => 'ANYOFH[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10A}]' => 'ANYOFH[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10B}]' => 'ANYOFH[0102-010B]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10C}]' => 'ANYOFH[0102-010C]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}]' => 'ANYOFH[0102-0104 0106 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{HIGHEST_CP}]' => 'ANYOFH[0102-HIGHEST_CP]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{106}]' => 'ANYOFHb[0102-0106 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{107}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{108}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{109}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10A}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10B}]' => 'ANYOFRb[0102-010B]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10C}]' => 'ANYOFRb[0102-010C]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}]' => 'ANYOFHb[0102-0104 0106 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{INFTY}]' => 'ANYOFH[0102-0104 0106-INFTY]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{INFTY_minus_1}]' => 'ANYOFH[0102-0104 0106-INFTY_minus_1]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{107}]' => 'ANYOFH[0102-0104 0106-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{108}]' => 'ANYOFH[0102-0104 0106-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{109}]' => 'ANYOFH[0102-0104 0106-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10A}]' => 'ANYOFH[0102-0104 0106-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10B}]' => 'ANYOFH[0102-0104 0106-010B]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10C}]' => 'ANYOFH[0102-0104 0106-010C]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{107}]' => 'ANYOFH[0102-0104 0107-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{108}]' => 'ANYOFH[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{109}]' => 'ANYOFH[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{10A}]' => 'ANYOFH[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{10B}]' => 'ANYOFH[0102-0104 0108-010B]',
- '[\x{103}\x{102}]' => 'ANYOFH[0102-0103]',
- '[\x{104}\x{102}]' => 'ANYOFH[0102 0104]',
- '[\x{104}\x{102}\x{103}]' => 'ANYOFH[0102-0104]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{HIGHEST_CP}]' => 'ANYOFH[0102-0104 0106-HIGHEST_CP]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{107}]' => 'ANYOFHb[0102-0104 0106-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{108}]' => 'ANYOFHb[0102-0104 0106-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{109}]' => 'ANYOFHb[0102-0104 0106-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10A}]' => 'ANYOFHb[0102-0104 0106-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10B}]' => 'ANYOFHb[0102-0104 0106-010B]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10C}]' => 'ANYOFHb[0102-0104 0106-010C]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{107}]' => 'ANYOFHb[0102-0104 0107-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{108}]' => 'ANYOFHb[0102-0104 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{109}]' => 'ANYOFHb[0102-0104 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{10A}]' => 'ANYOFHb[0102-0104 0108-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{10B}]' => 'ANYOFHb[0102-0104 0108-010B]',
+ '[\x{103}\x{102}]' => 'EXACTFU_REQ8 <\x{103}>',
+ '[\x{104}\x{102}]' => 'ANYOFHb[0102 0104]',
+ '[\x{104}\x{102}\x{103}]' => 'ANYOFRb[0102-0104]',
'[\x{106}-{INFTY}\x{104}]' => 'ANYOFH[0104 0106-INFTY]',
'[\x{106}-{INFTY}\x{104}-{INFTY}]' => 'ANYOFH[0104-INFTY]',
- '[\x{106}-{INFTY}\x{104}-{INFTY_minus_1}]' => 'ANYOFH[0104-INFTY]',
+ '[\x{106}-{INFTY}\x{104}-{HIGHEST_CP}]' => 'ANYOFH[0104-INFTY]',
'[\x{106}-{INFTY}\x{104}-\x{105}]' => 'ANYOFH[0104-INFTY]',
'[\x{106}-{INFTY}\x{104}-\x{106}]' => 'ANYOFH[0104-INFTY]',
'[\x{106}-{INFTY}\x{104}-\x{107}]' => 'ANYOFH[0104-INFTY]',
'[\x{106}-{INFTY}\x{105}]' => 'ANYOFH[0105-INFTY]',
'[\x{106}-{INFTY}\x{105}-{INFTY}]' => 'ANYOFH[0105-INFTY]',
- '[\x{106}-{INFTY}\x{105}-{INFTY_minus_1}]' => 'ANYOFH[0105-INFTY]',
+ '[\x{106}-{INFTY}\x{105}-{HIGHEST_CP}]' => 'ANYOFH[0105-INFTY]',
'[\x{106}-{INFTY}\x{105}-\x{106}]' => 'ANYOFH[0105-INFTY]',
'[\x{106}-{INFTY}\x{105}-\x{107}]' => 'ANYOFH[0105-INFTY]',
'[\x{106}-{INFTY}\x{106}]' => 'ANYOFH[0106-INFTY]',
'[\x{106}-{INFTY}\x{106}-{INFTY}]' => 'ANYOFH[0106-INFTY]',
- '[\x{106}-{INFTY}\x{106}-{INFTY_minus_1}]' => 'ANYOFH[0106-INFTY]',
+ '[\x{106}-{INFTY}\x{106}-{HIGHEST_CP}]' => 'ANYOFH[0106-INFTY]',
'[\x{106}-{INFTY}\x{106}-\x{107}]' => 'ANYOFH[0106-INFTY]',
'[\x{106}-{INFTY}\x{107}]' => 'ANYOFH[0106-INFTY]',
'[\x{106}-{INFTY}\x{107}-{INFTY}]' => 'ANYOFH[0106-INFTY]',
- '[\x{106}-{INFTY}\x{107}-{INFTY_minus_1}]' => 'ANYOFH[0106-INFTY]',
+ '[\x{106}-{INFTY}\x{107}-{HIGHEST_CP}]' => 'ANYOFH[0106-INFTY]',
'[\x{106}-{INFTY}\x{107}-\x{107}]' => 'ANYOFH[0106-INFTY]',
- '[\x{10C}-{INFTY}{INFTY}]' => 'ANYOFH[010C-INFTY]',
- '[\x{10C}-{INFTY}{INFTY_minus_1}]' => 'ANYOFH[010C-INFTY]',
- '[\x{10C}-{INFTY}\x{00}-{INFTY_minus_1}]' => 'SANY',
+ '[\x{10C}-{INFTY}{HIGHEST_CP}]' => 'ANYOFH[010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{00}-{HIGHEST_CP}]' => 'SANY',
'[\x{10C}-{INFTY}\x{00}-{INFTY}]' => 'SANY',
'[\x{10C}-{INFTY}\x{101}-{INFTY}]' => 'ANYOFH[0101-INFTY]',
- '[\x{10C}-{INFTY}\x{101}-{INFTY_minus_1}]' => 'ANYOFH[0101-INFTY]',
+ '[\x{10C}-{INFTY}\x{101}-{HIGHEST_CP}]' => 'ANYOFH[0101-INFTY]',
'[\x{10C}-{INFTY}\x{102}\x{104}]' => 'ANYOFH[0102 0104 010C-INFTY]',
- '[\x{10C}-{INFTY}\x{102}-\x{104}{INFTY}]' => 'ANYOFH[0102-0104 010C-INFTY]',
- '[\x{10C}-{INFTY}\x{102}-\x{104}{INFTY_minus_1}]' => 'ANYOFH[0102-0104 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}{HIGHEST_CP}]' => 'ANYOFH[0102-0104 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{100}]' => 'ANYOFH[0100 0102-0104 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{101}]' => 'ANYOFH[0101-0104 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{101}-{INFTY}]' => 'ANYOFH[0101-INFTY]',
- '[\x{10C}-{INFTY}\x{102}-\x{104}\x{101}-{INFTY_minus_1}]' => 'ANYOFH[0101-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{101}-{HIGHEST_CP}]' => 'ANYOFH[0101-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{102}]' => 'ANYOFH[0102-0104 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{102}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
- '[\x{10C}-{INFTY}\x{102}-\x{104}\x{102}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{102}-{HIGHEST_CP}]' => 'ANYOFH[0102-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{103}]' => 'ANYOFH[0102-0104 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{103}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
- '[\x{10C}-{INFTY}\x{102}-\x{104}\x{103}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{103}-{HIGHEST_CP}]' => 'ANYOFH[0102-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{104}]' => 'ANYOFH[0102-0104 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{104}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
- '[\x{10C}-{INFTY}\x{102}-\x{104}\x{104}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{104}-{HIGHEST_CP}]' => 'ANYOFH[0102-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{105}]' => 'ANYOFH[0102-0105 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{105}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
- '[\x{10C}-{INFTY}\x{102}-\x{104}\x{105}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{105}-{HIGHEST_CP}]' => 'ANYOFH[0102-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{106}]' => 'ANYOFH[0102-0104 0106 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{106}-{INFTY}]' => 'ANYOFH[0102-0104 0106-INFTY]',
- '[\x{10C}-{INFTY}\x{102}-\x{104}\x{106}-{INFTY_minus_1}]' => 'ANYOFH[0102-0104 0106-INFTY]',
- '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}{INFTY}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
- '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}{INFTY_minus_1}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{106}-{HIGHEST_CP}]' => 'ANYOFH[0102-0104 0106-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}{HIGHEST_CP}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}]' => 'ANYOFH[0101-0104 0108-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{INFTY}]' => 'ANYOFH[0101-INFTY]',
- '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{INFTY_minus_1}]' => 'ANYOFH[0101-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{HIGHEST_CP}]' => 'ANYOFH[0101-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{102}]' => 'ANYOFH[0101-0104 0108-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{103}]' => 'ANYOFH[0101-0104 0108-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{104}]' => 'ANYOFH[0101-0104 0108-010A 010C-INFTY]',
@@ -645,7 +644,7 @@ my @tests = (
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10B}]' => 'ANYOFH[0101-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
- '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{HIGHEST_CP}]' => 'ANYOFH[0102-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{102}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{103}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{104}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
@@ -659,7 +658,7 @@ my @tests = (
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10C}]' => 'ANYOFH[0102-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
- '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{HIGHEST_CP}]' => 'ANYOFH[0102-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{104}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{105}]' => 'ANYOFH[0102-0105 0108-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{106}]' => 'ANYOFH[0102-0106 0108-010A 010C-INFTY]',
@@ -671,7 +670,7 @@ my @tests = (
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10C}]' => 'ANYOFH[0102-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
- '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{HIGHEST_CP}]' => 'ANYOFH[0102-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{105}]' => 'ANYOFH[0102-0105 0108-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{106}]' => 'ANYOFH[0102-0106 0108-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{107}]' => 'ANYOFH[0102-010A 010C-INFTY]',
@@ -682,7 +681,7 @@ my @tests = (
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10C}]' => 'ANYOFH[0102-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}]' => 'ANYOFH[0102-0105 0108-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
- '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{HIGHEST_CP}]' => 'ANYOFH[0102-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{106}]' => 'ANYOFH[0102-0106 0108-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{107}]' => 'ANYOFH[0102-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{108}]' => 'ANYOFH[0102-010A 010C-INFTY]',
@@ -692,7 +691,7 @@ my @tests = (
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10C}]' => 'ANYOFH[0102-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}]' => 'ANYOFH[0102-0104 0106 0108-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{INFTY}]' => 'ANYOFH[0102-0104 0106-INFTY]',
- '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{INFTY_minus_1}]' => 'ANYOFH[0102-0104 0106-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{HIGHEST_CP}]' => 'ANYOFH[0102-0104 0106-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{107}]' => 'ANYOFH[0102-0104 0106-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{108}]' => 'ANYOFH[0102-0104 0106-010A 010C-INFTY]',
'[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{109}]' => 'ANYOFH[0102-0104 0106-010A 010C-INFTY]',
@@ -707,21 +706,20 @@ my @tests = (
'[\x{10C}-{INFTY}\x{103}\x{102}]' => 'ANYOFH[0102-0103 010C-INFTY]',
'[\x{10C}-{INFTY}\x{104}\x{102}]' => 'ANYOFH[0102 0104 010C-INFTY]',
'[\x{10C}-{INFTY}\x{104}\x{102}\x{103}]' => 'ANYOFH[0102-0104 010C-INFTY]',
- '[{INFTY_minus_1}]' => 'ANYOFH[INFTY_minus_1]',
- '[{INFTY}]' => 'ANYOFH[INFTY-INFTY]',
+ '[{HIGHEST_CP}]' => 'EXACT_REQ8 <\x{HIGHEST_CP}>',
- '(?8)(?i)[\x{100}]' => 'EXACTFU_ONLY8 <\x{101}>',
- '(?8)(?i)[\x{399}]' => 'EXACTFU_ONLY8 <\x{3b9}>',
- '(?8)(?i)[\x{345}\x{399}\x{3B9}\x{1FBE}]' => 'EXACTFU_ONLY8 <\x{3b9}>',
- '(?i)[\x{2b9}]' => 'ANYOFH[02B9]', # Doesn't participate in a fold
- '(?8)(?i)[\x{2b9}]' => 'EXACT_ONLY8 <\x{2b9}>',
- '(?i)[\x{2bc}]' => 'EXACTFU_ONLY8 <\x{2bc}>', # Part of a multi-char fold, ASCII component
- '(?i)[\x{390}]' => 'EXACTFU_ONLY8 <\x{3b9}\x{308}\x{301}>', # Part of a multi-char fold, no ASCII component
+ '(?8)(?i)[\x{410}]' => 'EXACTFU_REQ8 <\x{430}>',
+ '(?8)(?i)[\x{399}]' => 'EXACTFU_REQ8 <\x{3b9}>',
+ '(?8)(?i)[\x{345}\x{399}\x{3B9}\x{1FBE}]' => 'EXACTFU_REQ8 <\x{3b9}>',
+ '(?i)[\x{2b9}]' => 'EXACT_REQ8 <\x{2b9}>', # Doesn't participate in a fold
+ '(?8)(?i)[\x{2b9}]' => 'EXACT_REQ8 <\x{2b9}>',
+ '(?i)[\x{2bc}]' => 'EXACTFU_REQ8 <\x{2bc}>', # Part of a multi-char fold, ASCII component
+ '(?i)[\x{390}]' => 'EXACTFU_REQ8 <\x{3b9}\x{308}\x{301}>', # Part of a multi-char fold, no ASCII component
'(?i)[\x{1E9E}]' => 'EXACTFU <ss>',
'(?iaa)[\x{1E9E}]' => 'EXACTFAA <\x{17f}\x{17f}>',
'(?i)[\x{FB00}]' => 'EXACTFU <ff>',
- '(?iaa)[\x{FB00}]' => 'ANYOFH[FB00]',
+ '(?iaa)[\x{FB00}]' => 'EXACT_REQ8 <\x{fb00}>',
'(?i)[\x{FB00}]' => 'EXACTFU <ff>',
'(?i)[\x{FB01}]' => 'EXACTFU <fi>',
'(?i)[\x{FB02}]' => 'EXACTFU <fl>',
@@ -731,11 +729,11 @@ my @tests = (
'(?i)[\x{FB06}]' => 'EXACTFU <st>',
'[a][b]' => 'EXACT <ab>',
- '[a]\x{100}' => 'EXACT_ONLY8 <a\x{100}>',
- '(?8)[\x{100}]a' => 'EXACT_ONLY8 <\x{100}a>',
+ '[a]\x{100}' => 'EXACT_REQ8 <a\x{100}>',
+ '(?8)[\x{100}]a' => 'EXACT_REQ8 <\x{100}a>',
'(?i)[b][c]' => 'EXACTFU <bc>',
- '(?i)[b]\x{100}' => 'EXACTFU_ONLY8 <b\x{101}>',
- '(?8)(?i)[\x{100}]b' => 'EXACTFU_ONLY8 <\x{101}b>',
+ '(?i)[b]\x{100}' => 'EXACTFU_REQ8 <b\x{101}>',
+ '(?8)(?i)[\x{100}]b' => 'EXACTFU_REQ8 <\x{101}b>',
'(?i)b[s]' => 'EXACTFU <bs>',
'(?i)b[s]c' => 'EXACTFU <bsc>',
'(?i)bs[s]c' => 'EXACTF <bss>', # The c goes into a 2nd node
@@ -785,6 +783,7 @@ my @single_chars_to_test =
"\x{106}",
"\x{107}",
"\x{108}",
+ "\x{2029}",
);
my @single_tests;
@@ -820,29 +819,40 @@ for my $char (@single_chars_to_test) {
push @single_tests, get_compiled("$upgrade$modifiers\\x{$hex}");
}
else {
- my $interior = "";
- my @list = $cp;
+ use feature 'fc';
+
+ my %list = ( sprintf("%X", $cp) => 1 );
if ($fold) {
- if (lc $char ne $char) {
- push @list, ord lc $char;
- }
- elsif (uc $char ne $char) {
- push @list, ord uc $char;
+ for my $op (qw(fc lc uc)) {
+ my $result = eval "$op(\"$char\")";
+ $list{sprintf "%X", ord $result} = 1;
}
}
- @list = sort { $a <=> $b } @list;
- if (@list == 1) {
- $interior = sprintf "%04X", $list[0];
- }
- elsif (@list == 2) {
- my $separator = ($list[1] == $list[0] + 1) ? '-' : ', ';
- $interior = sprintf "%04X$separator%04X", $list[0], $list[1];
+
+ my $mod_cp = $cp;
+ my $op;
+
+ if (! $fold || scalar keys %list == 1) {
+ $op = ($charset eq 'l')
+ ? 'EXACTL'
+ : ($cp < 256)
+ ? 'EXACT'
+ : 'EXACT_REQ8';
}
else {
- die join ", ", @list;
+ $op = ($charset eq 'aa')
+ ? 'EXACTFAA'
+ : ($charset eq 'l')
+ ? (($cp < 256)
+ ? 'EXACTFL'
+ : 'EXACTFLU8')
+ : ($cp < 256)
+ ? 'EXACTFU'
+ : 'EXACTFU_REQ8';
+ $mod_cp = ord fc $char;
}
- my $anyof = ($charset eq "l") ? "ANYOFL" : "ANYOFH";
- push @single_tests, "$anyof\[$interior\]";
+
+ push @single_tests, sprintf "$op <\\x{%X}>", $mod_cp;
}
}
}
@@ -867,18 +877,17 @@ while (defined (my $test = shift @tests)) {
skip("test not ported to EBCDIC", 1) if $skip_ebcdic;
my $display_expected = $expected
- =~ s/ INFTY_minus_1 /$next_highest_cp/xgr;
+ =~ s/ HIGHEST_CP /$highest_cp_string/xgr;
my $test_name = "Verify compilation of $test displays as"
- . " $display_expected";
+ . " $expected";
my $result = get_compiled($test);
- if ($expected =~ / ^ ANYOFH /x) {
+ if ($expected =~ / ^ ANYOF[HR] /x) {
like($result, qr/ ^ \Q$expected\E (?:\Q (First UTF-8 byte=\x\E
- [[:xdigit:]]{2}\) )? $ /x, $test_name);
+ [[:xdigit:]]{2} )? /x, $test_name);
}
else {
- is($result, $expected,
- "Verify compilation of $test displays as $test_name");
+ is($result, $expected, $test_name);
}
}
}
diff --git a/gnu/usr.bin/perl/t/re/begin-once.t b/gnu/usr.bin/perl/t/re/begin-once.t
new file mode 100644
index 00000000000..e41d4318305
--- /dev/null
+++ b/gnu/usr.bin/perl/t/re/begin-once.t
@@ -0,0 +1,28 @@
+#!./perl
+
+use strict;
+use warnings;
+
+sub freeze_at_begin {
+ my ($var) = @_;
+
+ return $var =~ m{$var}o;
+}
+
+BEGIN {
+ chdir 't' if -d 't';
+ require './test.pl';
+
+ freeze_at_begin('frozen');
+}
+
+plan tests => 2;
+
+ok( !freeze_at_begin('not'), "/o done at begin is preserved and a new string does not match" );
+ok( freeze_at_begin('frozen'), "/o done at begin is preserved and the original string matches" );
+
+1;
+
+#
+# ex: set ts=8 sts=4 sw=4 et:
+#
diff --git a/gnu/usr.bin/perl/t/re/regexp_nonull.t b/gnu/usr.bin/perl/t/re/regexp_nonull.t
index 885ef0f61db..979af25aade 100644
--- a/gnu/usr.bin/perl/t/re/regexp_nonull.t
+++ b/gnu/usr.bin/perl/t/re/regexp_nonull.t
@@ -7,7 +7,6 @@ print("1..0 # Skip No XS::APItest under miniperl\n"), exit 0 if
!defined &DynaLoader::boot_DynaLoader;
$no_null = 1;
-require XS::APItest;
for $file ('./re/regexp.t', './t/re/regexp.t', ':re:regexp.t') {
if (-r $file) {
do $file or die $@;
diff --git a/gnu/usr.bin/perl/t/re/uniprops01.t b/gnu/usr.bin/perl/t/re/uniprops01.t
index 4b4231c7c6f..768c609c5a2 100644
--- a/gnu/usr.bin/perl/t/re/uniprops01.t
+++ b/gnu/usr.bin/perl/t/re/uniprops01.t
@@ -29,7 +29,7 @@ do '../lib/unicore/TestProp.pl';
# Since TestProp.pl explicitly exits, we will only get here if it
# could not load.
if (defined &DynaLoader::boot_DynaLoader # not miniperl
- || eval 'require "unicore/Heavy.pl"' # or tables are built
+ || eval 'require "unicore/UCD.pl"' # or tables are built
) {
die "Could not run lib/unicore/TestProp.pl: ", $@||$!;
}
diff --git a/gnu/usr.bin/perl/t/re/uniprops02.t b/gnu/usr.bin/perl/t/re/uniprops02.t
index 8895ae9ae3f..1de337e7514 100644
--- a/gnu/usr.bin/perl/t/re/uniprops02.t
+++ b/gnu/usr.bin/perl/t/re/uniprops02.t
@@ -29,7 +29,7 @@ do '../lib/unicore/TestProp.pl';
# Since TestProp.pl explicitly exits, we will only get here if it
# could not load.
if (defined &DynaLoader::boot_DynaLoader # not miniperl
- || eval 'require "unicore/Heavy.pl"' # or tables are built
+ || eval 'require "unicore/UCD.pl"' # or tables are built
) {
die "Could not run lib/unicore/TestProp.pl: ", $@||$!;
}
diff --git a/gnu/usr.bin/perl/t/re/uniprops03.t b/gnu/usr.bin/perl/t/re/uniprops03.t
index c866407de73..54fd781503e 100644
--- a/gnu/usr.bin/perl/t/re/uniprops03.t
+++ b/gnu/usr.bin/perl/t/re/uniprops03.t
@@ -29,7 +29,7 @@ do '../lib/unicore/TestProp.pl';
# Since TestProp.pl explicitly exits, we will only get here if it
# could not load.
if (defined &DynaLoader::boot_DynaLoader # not miniperl
- || eval 'require "unicore/Heavy.pl"' # or tables are built
+ || eval 'require "unicore/UCD.pl"' # or tables are built
) {
die "Could not run lib/unicore/TestProp.pl: ", $@||$!;
}
diff --git a/gnu/usr.bin/perl/t/re/uniprops04.t b/gnu/usr.bin/perl/t/re/uniprops04.t
index 7689df0e4da..b1d206d07d1 100644
--- a/gnu/usr.bin/perl/t/re/uniprops04.t
+++ b/gnu/usr.bin/perl/t/re/uniprops04.t
@@ -29,7 +29,7 @@ do '../lib/unicore/TestProp.pl';
# Since TestProp.pl explicitly exits, we will only get here if it
# could not load.
if (defined &DynaLoader::boot_DynaLoader # not miniperl
- || eval 'require "unicore/Heavy.pl"' # or tables are built
+ || eval 'require "unicore/UCD.pl"' # or tables are built
) {
die "Could not run lib/unicore/TestProp.pl: ", $@||$!;
}
diff --git a/gnu/usr.bin/perl/t/re/uniprops05.t b/gnu/usr.bin/perl/t/re/uniprops05.t
index 0573377547f..68bbaf24b72 100644
--- a/gnu/usr.bin/perl/t/re/uniprops05.t
+++ b/gnu/usr.bin/perl/t/re/uniprops05.t
@@ -29,7 +29,7 @@ do '../lib/unicore/TestProp.pl';
# Since TestProp.pl explicitly exits, we will only get here if it
# could not load.
if (defined &DynaLoader::boot_DynaLoader # not miniperl
- || eval 'require "unicore/Heavy.pl"' # or tables are built
+ || eval 'require "unicore/UCD.pl"' # or tables are built
) {
die "Could not run lib/unicore/TestProp.pl: ", $@||$!;
}
diff --git a/gnu/usr.bin/perl/t/re/uniprops06.t b/gnu/usr.bin/perl/t/re/uniprops06.t
index 74e6c45d4ad..6a3dabf1984 100644
--- a/gnu/usr.bin/perl/t/re/uniprops06.t
+++ b/gnu/usr.bin/perl/t/re/uniprops06.t
@@ -29,7 +29,7 @@ do '../lib/unicore/TestProp.pl';
# Since TestProp.pl explicitly exits, we will only get here if it
# could not load.
if (defined &DynaLoader::boot_DynaLoader # not miniperl
- || eval 'require "unicore/Heavy.pl"' # or tables are built
+ || eval 'require "unicore/UCD.pl"' # or tables are built
) {
die "Could not run lib/unicore/TestProp.pl: ", $@||$!;
}
diff --git a/gnu/usr.bin/perl/t/re/uniprops07.t b/gnu/usr.bin/perl/t/re/uniprops07.t
index fe6795498e7..97c80355eee 100644
--- a/gnu/usr.bin/perl/t/re/uniprops07.t
+++ b/gnu/usr.bin/perl/t/re/uniprops07.t
@@ -29,7 +29,7 @@ do '../lib/unicore/TestProp.pl';
# Since TestProp.pl explicitly exits, we will only get here if it
# could not load.
if (defined &DynaLoader::boot_DynaLoader # not miniperl
- || eval 'require "unicore/Heavy.pl"' # or tables are built
+ || eval 'require "unicore/UCD.pl"' # or tables are built
) {
die "Could not run lib/unicore/TestProp.pl: ", $@||$!;
}
diff --git a/gnu/usr.bin/perl/t/re/uniprops08.t b/gnu/usr.bin/perl/t/re/uniprops08.t
index a9b412a9037..52d5036b573 100644
--- a/gnu/usr.bin/perl/t/re/uniprops08.t
+++ b/gnu/usr.bin/perl/t/re/uniprops08.t
@@ -29,7 +29,7 @@ do '../lib/unicore/TestProp.pl';
# Since TestProp.pl explicitly exits, we will only get here if it
# could not load.
if (defined &DynaLoader::boot_DynaLoader # not miniperl
- || eval 'require "unicore/Heavy.pl"' # or tables are built
+ || eval 'require "unicore/UCD.pl"' # or tables are built
) {
die "Could not run lib/unicore/TestProp.pl: ", $@||$!;
}
diff --git a/gnu/usr.bin/perl/t/re/uniprops09.t b/gnu/usr.bin/perl/t/re/uniprops09.t
index c9b469b4392..d58aafaf94b 100644
--- a/gnu/usr.bin/perl/t/re/uniprops09.t
+++ b/gnu/usr.bin/perl/t/re/uniprops09.t
@@ -29,7 +29,7 @@ do '../lib/unicore/TestProp.pl';
# Since TestProp.pl explicitly exits, we will only get here if it
# could not load.
if (defined &DynaLoader::boot_DynaLoader # not miniperl
- || eval 'require "unicore/Heavy.pl"' # or tables are built
+ || eval 'require "unicore/UCD.pl"' # or tables are built
) {
die "Could not run lib/unicore/TestProp.pl: ", $@||$!;
}
diff --git a/gnu/usr.bin/perl/t/re/uniprops10.t b/gnu/usr.bin/perl/t/re/uniprops10.t
index 0d0e1edd222..0b78d358b1b 100644
--- a/gnu/usr.bin/perl/t/re/uniprops10.t
+++ b/gnu/usr.bin/perl/t/re/uniprops10.t
@@ -29,7 +29,7 @@ do '../lib/unicore/TestProp.pl';
# Since TestProp.pl explicitly exits, we will only get here if it
# could not load.
if (defined &DynaLoader::boot_DynaLoader # not miniperl
- || eval 'require "unicore/Heavy.pl"' # or tables are built
+ || eval 'require "unicore/UCD.pl"' # or tables are built
) {
die "Could not run lib/unicore/TestProp.pl: ", $@||$!;
}