summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/t
diff options
context:
space:
mode:
authorAndrew Fresh <afresh1@cvs.openbsd.org>2019-12-30 02:11:11 +0000
committerAndrew Fresh <afresh1@cvs.openbsd.org>2019-12-30 02:11:11 +0000
commit24f96998b9bcba93445125a9cf010eb192b08a7e (patch)
tree9e5cdaf1e22c12f7248e39fd63c5a62ceef78b36 /gnu/usr.bin/perl/t
parent99ad85fe597bc1333273dd58cad463d90f6d7d8b (diff)
Import perl-5.30.1
Timing is good deraadt@, OK sthen@
Diffstat (limited to 'gnu/usr.bin/perl/t')
-rw-r--r--gnu/usr.bin/perl/t/io/getcwd.t22
-rw-r--r--gnu/usr.bin/perl/t/io/nargv.t48
-rw-r--r--gnu/usr.bin/perl/t/io/paragraph_mode.t504
-rw-r--r--gnu/usr.bin/perl/t/lib/croak/gv71
-rw-r--r--gnu/usr.bin/perl/t/lib/croak/pp_ctl2
-rw-r--r--gnu/usr.bin/perl/t/lib/croak/regcomp7
-rw-r--r--gnu/usr.bin/perl/t/lib/feature/removed10
-rw-r--r--gnu/usr.bin/perl/t/lib/warnings/2use18
-rw-r--r--gnu/usr.bin/perl/t/lib/warnings/gv66
-rw-r--r--gnu/usr.bin/perl/t/lib/warnings/util29
-rw-r--r--gnu/usr.bin/perl/t/op/stash_parse_gv.t2
-rw-r--r--gnu/usr.bin/perl/t/op/tr_latin1.t20
-rw-r--r--gnu/usr.bin/perl/t/re/alpha_assertions.t1
-rw-r--r--gnu/usr.bin/perl/t/re/anyof.t1120
-rw-r--r--gnu/usr.bin/perl/t/re/fold_grind.pl1058
-rw-r--r--gnu/usr.bin/perl/t/re/fold_grind_8.t36
-rw-r--r--gnu/usr.bin/perl/t/re/fold_grind_T.t35
-rw-r--r--gnu/usr.bin/perl/t/re/fold_grind_a.t24
-rw-r--r--gnu/usr.bin/perl/t/re/fold_grind_aa.t20
-rw-r--r--gnu/usr.bin/perl/t/re/fold_grind_d.t24
-rw-r--r--gnu/usr.bin/perl/t/re/fold_grind_l.t41
-rw-r--r--gnu/usr.bin/perl/t/re/fold_grind_u.t24
-rw-r--r--gnu/usr.bin/perl/t/re/user_prop_race_thr.t117
-rw-r--r--gnu/usr.bin/perl/t/uni/caller.t3
24 files changed, 2910 insertions, 392 deletions
diff --git a/gnu/usr.bin/perl/t/io/getcwd.t b/gnu/usr.bin/perl/t/io/getcwd.t
new file mode 100644
index 00000000000..f3ad58bb4c8
--- /dev/null
+++ b/gnu/usr.bin/perl/t/io/getcwd.t
@@ -0,0 +1,22 @@
+#!./perl -w
+
+BEGIN {
+ chdir 't' if -d 't';
+ require "./test.pl";
+ set_up_inc('../lib');
+}
+
+use Config;
+
+$Config{d_getcwd}
+ or plan skip_all => "no getcwd";
+
+my $cwd = Internals::getcwd();
+ok(!defined $cwd || $cwd ne "",
+ "Internals::getcwd() returned a reasonable result");
+
+if (defined $cwd) {
+ ok(-d $cwd, "check a success result is a directory");
+}
+
+done_testing();
diff --git a/gnu/usr.bin/perl/t/io/nargv.t b/gnu/usr.bin/perl/t/io/nargv.t
index 598ceed6178..a62c4f265eb 100644
--- a/gnu/usr.bin/perl/t/io/nargv.t
+++ b/gnu/usr.bin/perl/t/io/nargv.t
@@ -6,7 +6,7 @@ BEGIN {
set_up_inc('../lib');
}
-print "1..6\n";
+print "1..7\n";
my $j = 1;
for $i ( 1,2,5,4,3 ) {
@@ -84,6 +84,50 @@ sub other {
}
}
+{
+ # (perl #133314) directory handle leak
+ #
+ # We process a significant number of files here to make sure any
+ # leaks are significant
+ @ARGV = mkfiles(1 .. 10);
+ for my $file (@ARGV) {
+ open my $f, ">", $file;
+ print $f "\n";
+ close $f;
+ }
+ local $^I = ".bak";
+ local $_;
+ while (<>) {
+ s/^/foo/;
+ }
+}
+
+{
+ # (perl #133314) directory handle leak
+ # We open three handles here because the file processing opened:
+ # - the original file
+ # - the output file, and finally
+ # - the directory
+ # so we need to open the first two to use up the slots used for the original
+ # and output files.
+ # This test assumes fd are allocated in the typical *nix way - lowest
+ # available, which I believe is the case for the Win32 CRTs too.
+ # If this turns out not to be the case this test will need to skip on
+ # such platforms or only run on a small set of known-good platforms.
+ my $tfile = mkfiles(1);
+ open my $f, "<", $tfile
+ or die "Cannot open temp: $!";
+ open my $f2, "<", $tfile
+ or die "Cannot open temp: $!";
+ open my $f3, "<", $tfile
+ or die "Cannot open temp: $!";
+ print +(fileno($f3) < 20 ? "ok" : "not ok"), " 7 check fd leak\n";
+ close $f;
+ close $f2;
+ close $f3;
+}
+
+
my @files;
sub mkfiles {
foreach (@_) {
@@ -93,4 +137,4 @@ sub mkfiles {
return wantarray ? @results : @results[-1];
}
-END { unlink_all map { ($_, "$_.bak") } mkfiles(1..5) }
+END { unlink_all map { ($_, "$_.bak") } @files }
diff --git a/gnu/usr.bin/perl/t/io/paragraph_mode.t b/gnu/usr.bin/perl/t/io/paragraph_mode.t
new file mode 100644
index 00000000000..edbb4cb1964
--- /dev/null
+++ b/gnu/usr.bin/perl/t/io/paragraph_mode.t
@@ -0,0 +1,504 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ require './test.pl';
+ set_up_inc('../lib');
+}
+
+plan tests => 80;
+
+my ($OUT, $filename, @chunks, @expected, $msg);
+
+{
+ # We start with files whose "paragraphs" contain no internal newlines.
+ @chunks = (
+ join('' => ( 1..3 )),
+ join('' => ( 4..6 )),
+ join('' => ( 7..9 )),
+ 10
+ );
+
+ {
+ $msg = "'Well behaved' file: >= 2 newlines between text blocks; no internal newlines; 3 final newlines";
+
+ ($OUT, $filename) = open_tempfile();
+ print $OUT "$_\n" for (
+ $chunks[0],
+ ("") x 1,
+ $chunks[1],
+ ("") x 2,
+ $chunks[2],
+ ("") x 3,
+ );
+ print $OUT $chunks[3];
+ close $OUT or die;
+
+ @expected = (
+ "$chunks[0]\n\n",
+ "$chunks[1]\n\n",
+ "$chunks[2]\n\n",
+ $chunks[3],
+ );
+ local $/ = '';
+ perform_tests($filename, \@expected, $msg);
+ }
+
+ {
+ $msg = "'Well behaved' file: >= 2 newlines between text blocks; no internal newlines; 0 final newline";
+
+ ($OUT, $filename) = open_tempfile();
+ print $OUT "$_\n" for (
+ $chunks[0],
+ ("") x 1,
+ $chunks[1],
+ ("") x 2,
+ $chunks[2],
+ ("") x 3,
+ $chunks[3],
+ );
+ close $OUT or die;
+
+ @expected = (
+ "$chunks[0]\n\n",
+ "$chunks[1]\n\n",
+ "$chunks[2]\n\n",
+ "$chunks[3]\n",
+ );
+ local $/ = '';
+ perform_tests($filename, \@expected, $msg);
+ }
+
+ {
+ $msg = "'Well behaved' file: >= 2 newlines between text blocks; no internal newlines; 1 final newline";
+
+ ($OUT, $filename) = open_tempfile();
+ print $OUT "$_\n" for (
+ $chunks[0],
+ ("") x 1,
+ $chunks[1],
+ ("") x 2,
+ $chunks[2],
+ ("") x 3,
+ $chunks[3],
+ ("") x 1,
+ );
+ close $OUT or die;
+
+ @expected = (
+ "$chunks[0]\n\n",
+ "$chunks[1]\n\n",
+ "$chunks[2]\n\n",
+ "$chunks[3]\n\n",
+ );
+ local $/ = '';
+ perform_tests($filename, \@expected, $msg);
+ }
+
+ {
+ $msg = "'Well behaved' file: >= 2 newlines between text blocks; no internal newlines; 2 final newlines";
+
+ ($OUT, $filename) = open_tempfile();
+ print $OUT "$_\n" for (
+ $chunks[0],
+ ("") x 1,
+ $chunks[1],
+ ("") x 2,
+ $chunks[2],
+ ("") x 3,
+ $chunks[3],
+ ("") x 2,
+ );
+ close $OUT or die;
+
+ @expected = (
+ "$chunks[0]\n\n",
+ "$chunks[1]\n\n",
+ "$chunks[2]\n\n",
+ "$chunks[3]\n\n",
+ );
+ local $/ = '';
+ perform_tests($filename, \@expected, $msg);
+ }
+}
+
+{
+ # We continue with files whose "paragraphs" contain internal newlines.
+ @chunks = (
+ join('' => ( 1, 2, "\n", 3 )),
+ join('' => ( 4, 5, " \n", 6 )),
+ join('' => ( 7, 8, " \t\n", 9 )),
+ 10
+ );
+
+ {
+ $msg = "'Misbehaving' file: >= 2 newlines between text blocks; no internal newlines; 3 final newlines";
+
+ ($OUT, $filename) = open_tempfile();
+ print $OUT "$_\n" for (
+ $chunks[0],
+ ("") x 1,
+ $chunks[1],
+ ("") x 2,
+ $chunks[2],
+ ("") x 3,
+ );
+ print $OUT $chunks[3];
+ close $OUT or die;
+
+ @expected = (
+ "$chunks[0]\n\n",
+ "$chunks[1]\n\n",
+ "$chunks[2]\n\n",
+ $chunks[3],
+ );
+ local $/ = '';
+ perform_tests($filename, \@expected, $msg);
+ }
+
+ {
+ $msg = "'Misbehaving' file: >= 2 newlines between text blocks; no internal newlines; 0 final newline";
+
+ ($OUT, $filename) = open_tempfile();
+ print $OUT "$_\n" for (
+ $chunks[0],
+ ("") x 1,
+ $chunks[1],
+ ("") x 2,
+ $chunks[2],
+ ("") x 3,
+ $chunks[3],
+ );
+ close $OUT or die;
+
+ @expected = (
+ "$chunks[0]\n\n",
+ "$chunks[1]\n\n",
+ "$chunks[2]\n\n",
+ "$chunks[3]\n",
+ );
+ local $/ = '';
+ perform_tests($filename, \@expected, $msg);
+ }
+
+ {
+ $msg = "'Misbehaving' file: >= 2 newlines between text blocks; no internal newlines; 1 final newline";
+
+ ($OUT, $filename) = open_tempfile();
+ print $OUT "$_\n" for (
+ $chunks[0],
+ ("") x 1,
+ $chunks[1],
+ ("") x 2,
+ $chunks[2],
+ ("") x 3,
+ $chunks[3],
+ ("") x 1,
+ );
+ close $OUT or die;
+
+ @expected = (
+ "$chunks[0]\n\n",
+ "$chunks[1]\n\n",
+ "$chunks[2]\n\n",
+ "$chunks[3]\n\n",
+ );
+ local $/ = '';
+ perform_tests($filename, \@expected, $msg);
+ }
+
+ {
+ $msg = "'Misbehaving' file: >= 2 newlines between text blocks; no internal newlines; 2 final newlines";
+
+ ($OUT, $filename) = open_tempfile();
+ print $OUT "$_\n" for (
+ $chunks[0],
+ ("") x 1,
+ $chunks[1],
+ ("") x 2,
+ $chunks[2],
+ ("") x 3,
+ $chunks[3],
+ ("") x 2,
+ );
+ close $OUT or die;
+
+ @expected = (
+ "$chunks[0]\n\n",
+ "$chunks[1]\n\n",
+ "$chunks[2]\n\n",
+ "$chunks[3]\n\n",
+ );
+ local $/ = '';
+ perform_tests($filename, \@expected, $msg);
+ }
+}
+
+{
+ # We continue with files which start with newlines
+ # but whose "paragraphs" contain no internal newlines.
+ # We'll set our expectation that the leading newlines will get trimmed off
+ # and everything else will proceed normally.
+
+ @chunks = (
+ join('' => ( 1..3 )),
+ join('' => ( 4..6 )),
+ join('' => ( 7..9 )),
+ 10
+ );
+
+ {
+ $msg = "'Badly behaved' file: leading newlines; 3 final newlines";
+
+ ($OUT, $filename) = open_tempfile();
+ print $OUT "\n\n\n";
+ print $OUT "$_\n" for (
+ $chunks[0],
+ ("") x 1,
+ $chunks[1],
+ ("") x 2,
+ $chunks[2],
+ ("") x 3,
+ );
+ print $OUT $chunks[3];
+ close $OUT or die;
+
+ @expected = (
+ "$chunks[0]\n\n",
+ "$chunks[1]\n\n",
+ "$chunks[2]\n\n",
+ $chunks[3],
+ );
+ local $/ = '';
+ perform_tests($filename, \@expected, $msg);
+ }
+
+ {
+ $msg = "'Badly behaved' file: leading newlines; 0 final newline";
+
+ ($OUT, $filename) = open_tempfile();
+ print $OUT "\n\n\n";
+ print $OUT "$_\n" for (
+ $chunks[0],
+ ("") x 1,
+ $chunks[1],
+ ("") x 2,
+ $chunks[2],
+ ("") x 3,
+ $chunks[3],
+ );
+ close $OUT or die;
+
+ @expected = (
+ "$chunks[0]\n\n",
+ "$chunks[1]\n\n",
+ "$chunks[2]\n\n",
+ "$chunks[3]\n",
+ );
+ local $/ = '';
+ perform_tests($filename, \@expected, $msg);
+ }
+
+ {
+ $msg = "'Badly behaved' file: leading newlines; 1 final newline";
+
+ ($OUT, $filename) = open_tempfile();
+ print $OUT "\n\n\n";
+ print $OUT "$_\n" for (
+ $chunks[0],
+ ("") x 1,
+ $chunks[1],
+ ("") x 2,
+ $chunks[2],
+ ("") x 3,
+ $chunks[3],
+ ("") x 1,
+ );
+ close $OUT or die;
+
+ @expected = (
+ "$chunks[0]\n\n",
+ "$chunks[1]\n\n",
+ "$chunks[2]\n\n",
+ "$chunks[3]\n\n",
+ );
+ local $/ = '';
+ perform_tests($filename, \@expected, $msg);
+ }
+
+ {
+ $msg = "'Badly behaved' file: leading newlines; 2 final newlines";
+
+ ($OUT, $filename) = open_tempfile();
+ print $OUT "\n\n\n";
+ print $OUT "$_\n" for (
+ $chunks[0],
+ ("") x 1,
+ $chunks[1],
+ ("") x 2,
+ $chunks[2],
+ ("") x 3,
+ $chunks[3],
+ ("") x 2,
+ );
+ close $OUT or die;
+
+ @expected = (
+ "$chunks[0]\n\n",
+ "$chunks[1]\n\n",
+ "$chunks[2]\n\n",
+ "$chunks[3]\n\n",
+ );
+ local $/ = '';
+ perform_tests($filename, \@expected, $msg);
+ }
+}
+
+{
+ # We continue with files which start with newlines
+ # and whose "paragraphs" contain internal newlines.
+ # We'll set our expectation that the leading newlines will get trimmed off
+ # and everything else will proceed normally.
+
+ @chunks = (
+ join('' => ( 1, 2, "\n", 3 )),
+ join('' => ( 4, 5, " \n", 6 )),
+ join('' => ( 7, 8, " \t\n", 9 )),
+ 10
+ );
+
+ {
+ $msg = "'Very badly behaved' file: leading newlines; internal newlines; 3 final newlines";
+
+ ($OUT, $filename) = open_tempfile();
+ print $OUT "\n\n\n";
+ print $OUT "$_\n" for (
+ $chunks[0],
+ ("") x 1,
+ $chunks[1],
+ ("") x 2,
+ $chunks[2],
+ ("") x 3,
+ );
+ print $OUT $chunks[3];
+ close $OUT or die;
+
+ @expected = (
+ "$chunks[0]\n\n",
+ "$chunks[1]\n\n",
+ "$chunks[2]\n\n",
+ $chunks[3],
+ );
+ local $/ = '';
+ perform_tests($filename, \@expected, $msg);
+ }
+
+ {
+ $msg = "'Very badly behaved' file: leading newlines; internal newlines; 0 final newline";
+
+ ($OUT, $filename) = open_tempfile();
+ print $OUT "\n\n\n";
+ print $OUT "$_\n" for (
+ $chunks[0],
+ ("") x 1,
+ $chunks[1],
+ ("") x 2,
+ $chunks[2],
+ ("") x 3,
+ $chunks[3],
+ );
+ close $OUT or die;
+
+ @expected = (
+ "$chunks[0]\n\n",
+ "$chunks[1]\n\n",
+ "$chunks[2]\n\n",
+ "$chunks[3]\n",
+ );
+ local $/ = '';
+ perform_tests($filename, \@expected, $msg);
+ }
+
+ {
+ $msg = "'Very badly behaved' file: leading newlines; internal newlines; 1 final newline";
+
+ ($OUT, $filename) = open_tempfile();
+ print $OUT "\n\n\n";
+ print $OUT "$_\n" for (
+ $chunks[0],
+ ("") x 1,
+ $chunks[1],
+ ("") x 2,
+ $chunks[2],
+ ("") x 3,
+ $chunks[3],
+ ("") x 1,
+ );
+ close $OUT or die;
+
+ @expected = (
+ "$chunks[0]\n\n",
+ "$chunks[1]\n\n",
+ "$chunks[2]\n\n",
+ "$chunks[3]\n\n",
+ );
+ local $/ = '';
+ perform_tests($filename, \@expected, $msg);
+ }
+
+ {
+ $msg = "'Very badly behaved' file: leading newlines; internal newlines; 2 final newlines";
+
+ ($OUT, $filename) = open_tempfile();
+ print $OUT "\n\n\n";
+ print $OUT "$_\n" for (
+ $chunks[0],
+ ("") x 1,
+ $chunks[1],
+ ("") x 2,
+ $chunks[2],
+ ("") x 3,
+ $chunks[3],
+ ("") x 2,
+ );
+ close $OUT or die;
+
+ @expected = (
+ "$chunks[0]\n\n",
+ "$chunks[1]\n\n",
+ "$chunks[2]\n\n",
+ "$chunks[3]\n\n",
+ );
+ local $/ = '';
+ perform_tests($filename, \@expected, $msg);
+ }
+}
+
+########## SUBROUTINES ##########
+
+sub open_tempfile {
+ my $filename = tempfile();
+ open my $OUT, '>', $filename or die;
+ binmode $OUT;
+ return ($OUT, $filename);
+}
+
+sub perform_tests {
+ my ($filename, $expected, $msg) = @_;
+ open my $IN, '<', $filename or die;
+ my @got = <$IN>;
+ my $success = 1;
+ for (my $i=0; $i<=$#${expected}; $i++) {
+ if ($got[$i] ne $expected->[$i]) {
+ $success = 0;
+ last;
+ }
+ }
+ ok($success, $msg);
+
+ seek $IN, 0, 0;
+ for (my $i=0; $i<=$#${expected}; $i++) {
+ is(<$IN>, $expected->[$i], "Got expected record $i");
+ }
+ close $IN or die;
+}
diff --git a/gnu/usr.bin/perl/t/lib/croak/gv b/gnu/usr.bin/perl/t/lib/croak/gv
new file mode 100644
index 00000000000..dabc099570b
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/croak/gv
@@ -0,0 +1,71 @@
+__END__
+########
+# NAME $# is no longer supported as of Perl 5.30 [RT #133583]
+$a = ${"#"};
+EXPECT
+$# is no longer supported as of Perl 5.30 at - line 1.
+########
+# NAME $* is no longer supported as of Perl 5.30 [RT #133583]
+$a = ${"*"};
+EXPECT
+$* is no longer supported as of Perl 5.30 at - line 1.
+########
+# NAME $# is no longer supported as of Perl 5.30 [RT #133583]
+$a = ${#};
+EXPECT
+$# is no longer supported as of Perl 5.30 at - line 1.
+########
+# NAME $* is no longer supported as of Perl 5.30 [RT #133583]
+$a = ${*};
+EXPECT
+$* is no longer supported as of Perl 5.30 at - line 1.
+########
+# NAME $# is no longer supported as of Perl 5.30 [RT #133583]
+$a = $#;
+EXPECT
+$# is no longer supported as of Perl 5.30 at - line 1.
+########
+# NAME $* is no longer supported as of Perl 5.30 [RT #133583]
+$a = $*;
+EXPECT
+$* is no longer supported as of Perl 5.30 at - line 1.
+########
+# NAME $# is no longer supported as of Perl 5.30 [RT #133583]
+$# = $a;
+EXPECT
+$# is no longer supported as of Perl 5.30 at - line 1.
+########
+# NAME $* is no longer supported as of Perl 5.30 [RT #133583]
+$* = $a;
+EXPECT
+$* is no longer supported as of Perl 5.30 at - line 1.
+########
+# NAME $# is no longer supported as of Perl 5.30 [RT #133583]
+$a = \$#;
+EXPECT
+$# is no longer supported as of Perl 5.30 at - line 1.
+########
+# NAME $* is no longer supported as of Perl 5.30 [RT #133583]
+$a = \$*;
+EXPECT
+$* is no longer supported as of Perl 5.30 at - line 1.
+########
+# NAME $# is no longer supported as of Perl 5.30 [RT #133583]
+$a = \$#;
+EXPECT
+$# is no longer supported as of Perl 5.30 at - line 1.
+########
+# NAME $* is no longer supported as of Perl 5.30 [RT #133583]
+$a = $*;
+EXPECT
+$* is no longer supported as of Perl 5.30 at - line 1.
+########
+# NAME $# is no longer supported as of Perl 5.30 [RT #133583]
+$a = $#;
+EXPECT
+$# is no longer supported as of Perl 5.30 at - line 1.
+########
+# NAME $* is no longer supported as of Perl 5.30 [RT #133583]
+$a = $*;
+EXPECT
+$* is no longer supported as of Perl 5.30 at - line 1.
diff --git a/gnu/usr.bin/perl/t/lib/croak/pp_ctl b/gnu/usr.bin/perl/t/lib/croak/pp_ctl
index f705b653575..b1e754c356b 100644
--- a/gnu/usr.bin/perl/t/lib/croak/pp_ctl
+++ b/gnu/usr.bin/perl/t/lib/croak/pp_ctl
@@ -36,7 +36,7 @@ Can't "goto" into a binary or list expression at - line 5.
# NAME dump with computed label
no warnings 'deprecated';
my $label = "foo";
-dump $label;
+CORE::dump $label;
EXPECT
Can't find label foo at - line 3.
########
diff --git a/gnu/usr.bin/perl/t/lib/croak/regcomp b/gnu/usr.bin/perl/t/lib/croak/regcomp
index c72e3d47bf1..0ba705e9159 100644
--- a/gnu/usr.bin/perl/t/lib/croak/regcomp
+++ b/gnu/usr.bin/perl/t/lib/croak/regcomp
@@ -63,3 +63,10 @@ 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 ${^RE_COMPILE_RECURSION_LIMIT} [perl #131551]
+BEGIN { ${^RE_COMPILE_RECURSION_LIMIT} = ${^RE_COMPILE_RECURSION_LIMIT} = 2; }
+qr/(a)/;
+qr/((a))/;
+EXPECT
+Too many nested open parens in regex; marked by <-- HERE in m/(( <-- HERE a))/ at - line 3.
+########
diff --git a/gnu/usr.bin/perl/t/lib/feature/removed b/gnu/usr.bin/perl/t/lib/feature/removed
new file mode 100644
index 00000000000..f2805eecd86
--- /dev/null
+++ b/gnu/usr.bin/perl/t/lib/feature/removed
@@ -0,0 +1,10 @@
+Test that removed features can be disabled, but not enabled.
+
+__END__
+use feature "array_base";
+EXPECT
+OPTIONS regex
+^Feature "array_base" is not supported by Perl [v0-9.]+ at - line 1.
+########
+no feature "array_base";
+EXPECT
diff --git a/gnu/usr.bin/perl/t/lib/warnings/2use b/gnu/usr.bin/perl/t/lib/warnings/2use
index a02505eff1d..4df98e2baa6 100644
--- a/gnu/usr.bin/perl/t/lib/warnings/2use
+++ b/gnu/usr.bin/perl/t/lib/warnings/2use
@@ -359,21 +359,3 @@ EXPECT
Reversed += operator at - line 6.
Use of uninitialized value $c in scalar chop at - line 9.
########
-
-# Check that deprecation warnings are not implicitly disabled by use
-$*;
-use warnings "void";
-$#;
-EXPECT
-$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 3.
-$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 5.
-Useless use of a variable in void context at - line 5.
-########
-
-# Check that deprecation warnings are not implicitly disabled by no
-$*;
-no warnings "void";
-$#;
-EXPECT
-$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 3.
-$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 5.
diff --git a/gnu/usr.bin/perl/t/lib/warnings/gv b/gnu/usr.bin/perl/t/lib/warnings/gv
index 122e4904e48..2a2dcf45470 100644
--- a/gnu/usr.bin/perl/t/lib/warnings/gv
+++ b/gnu/usr.bin/perl/t/lib/warnings/gv
@@ -3,12 +3,6 @@
Can't locate package %s for @%s::ISA
@ISA = qw(Fred); joe()
- $# is no longer supported
- $* is no longer supported
-
- $a = ${"#"} ;
- $a = ${"*"} ;
-
Name "main::a" used only once: possible typo
Mandatory Warnings ALL TODO
@@ -32,66 +26,6 @@ EXPECT
Undefined subroutine &main::joe called at - line 3.
########
# gv.c
-$a = ${"#"};
-$a = ${"*"};
-no warnings 'deprecated' ;
-$a = ${"#"};
-$a = ${"*"};
-EXPECT
-$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 2.
-$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 3.
-########
-# gv.c
-$a = ${#};
-$a = ${*};
-no warnings 'deprecated' ;
-$a = ${#};
-$a = ${*};
-EXPECT
-$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 2.
-$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 3.
-########
-# gv.c
-$a = $#;
-$a = $*;
-$# = $a;
-$* = $a;
-$a = \$#;
-$a = \$*;
-no warnings 'deprecated' ;
-$a = $#;
-$a = $*;
-$# = $a;
-$* = $a;
-$a = \$#;
-$a = \$*;
-EXPECT
-$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 2.
-$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 3.
-$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 4.
-$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 5.
-$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 6.
-$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 7.
-########
-# gv.c
-@a = @#;
-@a = @*;
-$a = $#;
-$a = $*;
-EXPECT
-$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 4.
-$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 5.
-########
-# gv.c
-$a = $#;
-$a = $*;
-@a = @#;
-@a = @*;
-EXPECT
-$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 2.
-$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 3.
-########
-# gv.c
$a = ${^ENCODING};
$a = ${^E_NCODING};
${^E_NCODING} = 1; # We pretend this variable never existed.
diff --git a/gnu/usr.bin/perl/t/lib/warnings/util b/gnu/usr.bin/perl/t/lib/warnings/util
index e82d6a66171..92be6efa732 100644
--- a/gnu/usr.bin/perl/t/lib/warnings/util
+++ b/gnu/usr.bin/perl/t/lib/warnings/util
@@ -106,3 +106,32 @@ no warnings 'portable' ;
$a = oct "0047777777777" ;
EXPECT
Octal number > 037777777777 non-portable at - line 5.
+########
+# util.c
+# NAME 132683: Use of uninitialized value" in warn() with constant folding and overloaded numbers
+use strict;
+use warnings;
+
+package Foo;
+
+use overload log => sub {
+ warn "here\n"; # Use of uninitialized value in warn
+ CORE::log($_[0]->{value});
+};
+
+sub import {
+ overload::constant
+ integer => sub { __PACKAGE__->new($_[0]) };
+}
+
+sub new {
+ my ($class, $value) = @_;
+ bless {value => $value}, $class;
+}
+
+package main;
+
+BEGIN { Foo->import }
+my $x = log(2);
+EXPECT
+here
diff --git a/gnu/usr.bin/perl/t/op/stash_parse_gv.t b/gnu/usr.bin/perl/t/op/stash_parse_gv.t
index 05694ca8ce0..bd9e95cf37b 100644
--- a/gnu/usr.bin/perl/t/op/stash_parse_gv.t
+++ b/gnu/usr.bin/perl/t/op/stash_parse_gv.t
@@ -23,7 +23,7 @@ foreach my $t (@tests) {
my ( $sub, $name ) = @$t;
fresh_perl_is(
- qq[sub $sub { print qq[ok\n]} &{"$sub"} ],
+ qq[sub $sub { print qq[ok\n]} &{"$sub"}; my \$d = defined *{"foo$sub"} ],
q[ok],
{ switches => ['-w'] },
$name
diff --git a/gnu/usr.bin/perl/t/op/tr_latin1.t b/gnu/usr.bin/perl/t/op/tr_latin1.t
new file mode 100644
index 00000000000..e01477c422f
--- /dev/null
+++ b/gnu/usr.bin/perl/t/op/tr_latin1.t
@@ -0,0 +1,20 @@
+# Tests for tr, but the test file is not utf8.
+
+BEGIN {
+ chdir 't' if -d 't';
+ require './test.pl';
+ set_up_inc('../lib');
+}
+
+plan tests => 1;
+
+{ # 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
+ # problem, because the '-' had already been parsed and was later added
+ # without making space for it
+ fresh_perl_is('print "\x8c" =~ y o\x{100}Č-oo', "1", { },
+ 'RT #134067 heap-buffer-overflow in S_scan_const');
+
+}
+
+1;
diff --git a/gnu/usr.bin/perl/t/re/alpha_assertions.t b/gnu/usr.bin/perl/t/re/alpha_assertions.t
index 3d28bbcdd25..f37ad890b0d 100644
--- a/gnu/usr.bin/perl/t/re/alpha_assertions.t
+++ b/gnu/usr.bin/perl/t/re/alpha_assertions.t
@@ -3,6 +3,7 @@
use strict;
use warnings;
no warnings 'once';
+no warnings 'experimental::vlb';
# This tests that the alphabetic assertions, like '(*atomic:...) work
# It just sets a flag and calls regexp.t which will run through its test
diff --git a/gnu/usr.bin/perl/t/re/anyof.t b/gnu/usr.bin/perl/t/re/anyof.t
index 12fb9b3a8cf..d33cbb2abea 100644
--- a/gnu/usr.bin/perl/t/re/anyof.t
+++ b/gnu/usr.bin/perl/t/re/anyof.t
@@ -1,5 +1,7 @@
#!./perl
+use strict;
+use warnings;
use utf8;
# This tests that the ANYOF nodes generated by bracketed character classes are
@@ -29,291 +31,825 @@ BEGIN {
# differences are skipped on EBCDIC. They are all at the beginning of the
# array, and a special marker entry is used to delmit the boundary between
# skipped and not skipped.
+#
+# 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);
+
+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}";
+
+sub get_compiled ($) {
+ # Convert platform-independent values to what is suitable for the
+ # platform
+
+ my $pattern = shift;
+
+ $pattern =~ s/\{INFTY\}/$highest_cp/g;
+ $pattern =~ s/\{INFTY_minus_1\}/$next_highest_cp/g;
+ my $use_utf8 = ($pattern =~ s/\Q(?8)//);
+
+ $pattern = "my \$a = '$pattern';";
+ $pattern .= "utf8::upgrade(\$a);" if $use_utf8;
+ $pattern .= "qr/\$a/";
+ my $actual_pattern = "use re qw(Debug COMPILE); $pattern";
+
+ my $result = fresh_perl($actual_pattern);
+ if ($? != 0) { # Re-run so as to display STDERR.
+ fail($pattern);
+ fresh_perl($actual_pattern, { stderr => 0, verbose => 1 });
+ return;
+ }
+
+ # The Debug output will come back as a bunch of lines. We are
+ # interested only in the line after /Final program/
+ my @lines = split /\n/, $result;
+ while (defined ($_ = shift @lines)) {
+ last if /Final program/;
+ }
+
+ $_ = shift @lines;
+
+ s/ \s* \( \d+ \) \s* //x; # Get rid of the node branch
+ 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;
+
+ return $_;
+}
+
+# Note: EXACTish lowercases the hex; ANYOF uppercases, without braces
my @tests = (
+ '[\xe0\xc0]' => 'EXACTFU <\\x{e0}>',
+ '[\xe1\xc1]' => 'EXACTFU <\\x{e1}>',
+ '[\xe2\xc2]' => 'EXACTFU <\\x{e2}>',
+ '[\xe3\xc3]' => 'EXACTFU <\\x{e3}>',
+ '[\xe4\xc4]' => 'EXACTFU <\\x{e4}>',
+ '[\xc5\xe5]' => 'ANYOF[\\xC5\\xE5]',
+ '[\xe6\xc6]' => 'EXACTFU <\\x{e6}>',
+ '[\xe7\xc7]' => 'EXACTFU <\\x{e7}>',
+ '[\xe8\xc8]' => 'EXACTFU <\\x{e8}>',
+ '[\xe9\xc9]' => 'EXACTFU <\\x{e9}>',
+ '[\xea\xca]' => 'EXACTFU <\\x{ea}>',
+ '[\xeb\xcb]' => 'EXACTFU <\\x{eb}>',
+ '[\xec\xcc]' => 'EXACTFU <\\x{ec}>',
+ '[\xee\xce]' => 'EXACTFU <\\x{ee}>',
+ '[\xef\xcf]' => 'EXACTFU <\\x{ef}>',
+ '[\xf0\xd0]' => 'EXACTFU <\\x{f0}>',
+ '[\xf1\xd1]' => 'EXACTFU <\\x{f1}>',
+ '[\xf2\xd2]' => 'EXACTFU <\\x{f2}>',
+ '[\xf3\xd3]' => 'EXACTFU <\\x{f3}>',
+ '[\xf4\xd4]' => 'EXACTFU <\\x{f4}>',
+ '[\xf5\xd5]' => 'EXACTFU <\\x{f5}>',
+ '[\xf6\xd6]' => 'EXACTFU <\\x{f6}>',
+ '[\xf8\xd8]' => 'EXACTFU <\\x{f8}>',
+ '[\xf9\xd9]' => 'EXACTFU <\\x{f9}>',
+ '[\xfa\xda]' => 'EXACTFU <\\x{fa}>',
+ '[\xfb\xdb]' => 'EXACTFU <\\x{fb}>',
+ '[\xfc\xdc]' => 'EXACTFU <\\x{fc}>',
+ '[\xfd\xdd]' => 'EXACTFU <\\x{fd}>',
+ '[\xfe\xde]' => 'EXACTFU <\\x{fe}>',
+
'[[{]' => 'ANYOFM[\[\{]',
'[^\S ]' => 'ANYOFD[\t\n\x0B\f\r{utf8}\x85\xA0][1680 2000-200A 2028-2029 202F 205F 3000]',
- '[^\n\r]' => 'ANYOF[^\n\r][0100-INFINITY]',
- '[^\/\|,\$\%%\@\ \%"\<\>\:\#\&\*\{\}\[\]\(\)]' => 'ANYOF[^ "#$%&()*,/:<>@\[\]\{|\}][0100-INFINITY]',
- '[^[:^print:][:^ascii:]]' => 'ANYOF[\x20-\x7E]',
- '[ [:blank:]]' => 'ANYOFD[\t {utf8}\xA0][1680 2000-200A 202F 205F 3000]',
- '[_[:^blank:]]' => 'ANYOFD[^\t {utf8}\xA0][0100-167F 1681-1FFF 200B-202E 2030-205E 2060-2FFF 3001-INFINITY]',
- '[\xA0[:^blank:]]' => 'ANYOF[^\t ][0100-167F 1681-1FFF 200B-202E 2030-205E 2060-2FFF 3001-INFINITY]',
- '[ [:blank:]]' => 'ANYOFD[\t {utf8}\xA0][1680 2000-200A 202F 205F 3000]',
- '[_[:^blank:]]' => 'ANYOFD[^\t {utf8}\xA0][0100-167F 1681-1FFF 200B-202E 2030-205E 2060-2FFF 3001-INFINITY]',
- '[\xA0[:^blank:]]' => 'ANYOF[^\t ][0100-167F 1681-1FFF 200B-202E 2030-205E 2060-2FFF 3001-INFINITY]',
- '(?d:[_[:^blank:]])' => 'ANYOFD[^\t {utf8}\xA0][0100-167F 1681-1FFF 200B-202E 2030-205E 2060-2FFF 3001-INFINITY]',
+ '[^\n\r]' => 'ANYOF[^\n\r][0100-INFTY]',
+ '[^\/\|,\$\%%\@\ \%"\<\>\:\#\&\*\{\}\[\]\(\)]' => 'ANYOF[^ "#$%&()*,/:<>@\[\]\{|\}][0100-INFTY]',
+ '[[:ascii:]]' => 'ANYOFM[\x00-\x7F]',
+ '[[:^ascii:]]' => 'NANYOFM[\x00-\x7F]',
+ '[[:^ascii:]\x{2C2}]' => 'NANYOFM[\x00-\x7F]',
+ '(?u)[[:ascii:]]' => 'ANYOFM[\x00-\x7F]',
+ '(?u)[[:^ascii:]]' => 'NANYOFM[\x00-\x7F]',
+ '(?a)[[:ascii:]]' => 'ANYOFM[\x00-\x7F]',
+ '(?a)[[:^ascii:]]' => 'NANYOFM[\x00-\x7F]',
+ '(?a)[[:^ascii:]\x{2C2}]' => 'NANYOFM[\x00-\x7F]',
+ '[[:cntrl:]]' => 'POSIXD[:cntrl:]',
+ '[^[:^print:][:^ascii:]]' => 'POSIXA[:print:]',
+ '[[:blank:]]' => 'POSIXD[:blank:]',
+ '[ [:blank:]]' => 'POSIXD[:blank:]',
+ '[_[:blank:]]' => 'ANYOFD[\t _{utf8}\xA0][1680 2000-200A 202F 205F 3000]',
+ '[_[:^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]',
- '(?il:(?[\x{212A}]))' => 'ANYOFL{utf8-locale-reqd}[Kk][212A]',
+ '(?il)[\x{212A}]' => 'ANYOFL{i}[{utf8 locale}Kk][212A]',
+ '(?il)(?[\x{212A}])' => 'ANYOFL{utf8-locale-reqd}[Kk][212A]',
+
+ '(?i)b[s]\xe0' => 'ANYOFM[Bb]', # The s goes into a 2nd node
+
+ '[aA]' => 'ANYOFM[Aa]',
+ '[bB]' => 'ANYOFM[Bb]',
+ '[kK]' => 'ANYOFM[Kk]',
'ebcdic_ok_below_this_marker',
+ '(?i:[^:])' => 'NANYOFM[:]',
+
+ '[^\n]' => 'REG_ANY',
+
+ '[[:alpha:]]' => 'POSIXD[:alpha:]',
+ '[[:^alpha:]]' => 'NPOSIXD[:alpha:]',
+ '[[:^alpha:]\x{2C2}]' => 'NPOSIXU[:alpha:]',
+ '(?l)[[:alpha:]]' => 'POSIXL[:alpha:]',
+ '(?l)[[:^alpha:]]' => 'NPOSIXL[:alpha:]',
+ '(?l)[[:^alpha:]\x{2C2}]' => 'NPOSIXL[:alpha:]',
+ '(?u)[[:alpha:]]' => 'POSIXU[:alpha:]',
+ '(?u)[[:^alpha:]]' => 'NPOSIXU[:alpha:]',
+ '(?a)[[:alpha:]]' => 'POSIXA[:alpha:]',
+ '(?a)[[:^alpha:]]' => 'NPOSIXA[:alpha:]',
+ '(?a)[[:^alpha:]\x{2C2}]' => 'NPOSIXA[:alpha:]',
+ '[[:alpha:][:^alpha:]]' => 'SANY',
+ '[^[:alpha:][:^alpha:]]' => 'OPFAIL',
+ '(?l)[[:alpha:][:^alpha:]]' => 'SANY',
+ '(?l)[^[:alpha:][:^alpha:]]' => 'OPFAIL',
+ '(?u)[[:alpha:][:^alpha:]]' => 'SANY',
+ '(?u)[^[:alpha:][:^alpha:]]' => 'OPFAIL',
+ '(?a)[[:alpha:][:^alpha:]]' => 'SANY',
+ '(?a)[^[:alpha:][:^alpha:]]' => 'OPFAIL',
+ '[[:alnum:]]' => 'POSIXD[:alnum:]',
+ '[[:^alnum:]]' => 'NPOSIXD[:alnum:]',
+ '[[:^alnum:]\x{2C2}]' => 'NPOSIXU[:alnum:]',
+ '(?l)[[:alnum:]]' => 'POSIXL[:alnum:]',
+ '(?l)[[:^alnum:]]' => 'NPOSIXL[:alnum:]',
+ '(?l)[[:^alnum:]\x{2C2}]' => 'NPOSIXL[:alnum:]',
+ '(?u)[[:alnum:]]' => 'POSIXU[:alnum:]',
+ '(?u)[[:^alnum:]]' => 'NPOSIXU[:alnum:]',
+ '(?a)[[:alnum:]]' => 'POSIXA[:alnum:]',
+ '(?a)[[:^alnum:]]' => 'NPOSIXA[:alnum:]',
+ '(?a)[[:^alnum:]\x{2C2}]' => 'NPOSIXA[:alnum:]',
+ '[[:alnum:][:^alnum:]]' => 'SANY',
+ '[^[:alnum:][:^alnum:]]' => 'OPFAIL',
+ '(?l)[[:alnum:][:^alnum:]]' => 'SANY',
+ '(?l)[^[:alnum:][:^alnum:]]' => 'OPFAIL',
+ '(?u)[[:alnum:][:^alnum:]]' => 'SANY',
+ '(?u)[^[:alnum:][:^alnum:]]' => 'OPFAIL',
+ '(?a)[[:alnum:][:^alnum:]]' => 'SANY',
+ '(?a)[^[:alnum:][:^alnum:]]' => 'OPFAIL',
+ '(?l)[[:ascii:]]' => 'POSIXL[:ascii:]',
+ '(?l)[[:^ascii:]]' => 'NPOSIXL[:ascii:]',
+ '(?l)[[:^ascii:]\x{2C2}]' => 'NPOSIXL[:ascii:]',
+ '[[:ascii:][:^ascii:]]' => 'SANY',
+ '[^[:ascii:][:^ascii:]]' => 'OPFAIL',
+ '(?l)[[:ascii:][:^ascii:]]' => 'SANY',
+ '(?l)[^[:ascii:][:^ascii:]]' => 'OPFAIL',
+ '(?u)[[:ascii:][:^ascii:]]' => 'SANY',
+ '(?u)[^[:ascii:][:^ascii:]]' => 'OPFAIL',
+ '(?a)[[:ascii:][:^ascii:]]' => 'SANY',
+ '(?a)[^[:ascii:][:^ascii:]]' => 'OPFAIL',
+ '[[:^blank:]]' => 'NPOSIXD[:blank:]',
+ '[[:^blank:]\x{2C2}]' => 'NPOSIXU[:blank:]',
+ '(?l)[[:blank:]]' => 'POSIXL[:blank:]',
+ '(?l)[[:^blank:]]' => 'NPOSIXL[:blank:]',
+ '(?l)[[:^blank:]\x{2C2}]' => 'NPOSIXL[:blank:]',
+ '(?u)[[:blank:]]' => 'POSIXU[:blank:]',
+ '(?u)[[:^blank:]]' => 'NPOSIXU[:blank:]',
+ '(?a)[[:blank:]]' => 'POSIXA[:blank:]',
+ '(?a)[[:^blank:]]' => 'NPOSIXA[:blank:]',
+ '(?a)[[:^blank:]\x{2C2}]' => 'NPOSIXA[:blank:]',
+ '[[:blank:]]' => 'POSIXD[:blank:]',
+ '[[:blank:][:^blank:]]' => 'SANY',
+ '[^[:blank:][:^blank:]]' => 'OPFAIL',
+ '(?l)[[:blank:][:^blank:]]' => 'SANY',
+ '(?l)[^[:blank:][:^blank:]]' => 'OPFAIL',
+ '(?u)[[:blank:][:^blank:]]' => 'SANY',
+ '(?u)[^[:blank:][:^blank:]]' => 'OPFAIL',
+ '(?a)[[:blank:][:^blank:]]' => 'SANY',
+ '(?a)[^[:blank:][:^blank:]]' => 'OPFAIL',
+ '[[:^cntrl:]]' => 'NPOSIXD[:cntrl:]',
+ '[[:^cntrl:]\x{2C2}]' => 'NPOSIXU[:cntrl:]',
+ '(?l)[[:cntrl:]]' => 'POSIXL[:cntrl:]',
+ '(?l)[[:^cntrl:]]' => 'NPOSIXL[:cntrl:]',
+ '(?l)[[:^cntrl:]\x{2C2}]' => 'NPOSIXL[:cntrl:]',
+ '(?u)[[:cntrl:]]' => 'POSIXU[:cntrl:]',
+ '(?u)[[:^cntrl:]]' => 'NPOSIXU[:cntrl:]',
+ '(?a)[[:cntrl:]]' => 'POSIXA[:cntrl:]',
+ '(?a)[[:^cntrl:]]' => 'NPOSIXA[:cntrl:]',
+ '(?a)[[:^cntrl:]\x{2C2}]' => 'NPOSIXA[:cntrl:]',
+ '[[:cntrl:][:^cntrl:]]' => 'SANY',
+ '[^[:cntrl:][:^cntrl:]]' => 'OPFAIL',
+ '(?l)[[:cntrl:][:^cntrl:]]' => 'SANY',
+ '(?l)[^[:cntrl:][:^cntrl:]]' => 'OPFAIL',
+ '(?u)[[:cntrl:][:^cntrl:]]' => 'SANY',
+ '(?u)[^[:cntrl:][:^cntrl:]]' => 'OPFAIL',
+ '(?a)[[:cntrl:][:^cntrl:]]' => 'SANY',
+ '(?a)[^[:cntrl:][:^cntrl:]]' => 'OPFAIL',
+ '[[:digit:]]' => 'POSIXU[\d]',
+ '[[:^digit:]]' => 'NPOSIXU[\d]',
+ '[[:^digit:]\x{2C2}]' => 'NPOSIXU[\d]',
+ '(?l)[[:digit:]]' => 'POSIXL[\d]',
+ '(?l)[[:^digit:]]' => 'NPOSIXL[\d]',
+ '(?l)[[:^digit:]\x{2C2}]' => 'NPOSIXL[\d]',
+ '(?u)[[:digit:]]' => 'POSIXU[\d]',
+ '(?u)[[:^digit:]]' => 'NPOSIXU[\d]',
+ '(?a)[[:digit:]]' => 'POSIXA[\d]',
+ '(?a)[[:^digit:]]' => 'NPOSIXA[\d]',
+ '(?a)[[:^digit:]\x{2C2}]' => 'NPOSIXA[\d]',
+ '[[:digit:][:^digit:]]' => 'SANY',
+ '[^[:digit:][:^digit:]]' => 'OPFAIL',
+ '(?l)[[:digit:][:^digit:]]' => 'SANY',
+ '(?l)[^[:digit:][:^digit:]]' => 'OPFAIL',
+ '(?u)[[:digit:][:^digit:]]' => 'SANY',
+ '(?u)[^[:digit:][:^digit:]]' => 'OPFAIL',
+ '(?a)[[:digit:][:^digit:]]' => 'SANY',
+ '(?a)[^[:digit:][:^digit:]]' => 'OPFAIL',
+ '[[:graph:]]' => 'POSIXD[:graph:]',
+ '[[:^graph:]]' => 'NPOSIXD[:graph:]',
+ '[[:^graph:]\x{FFFF}]' => 'NPOSIXU[:graph:]',
+ '(?l)[[:graph:]]' => 'POSIXL[:graph:]',
+ '(?l)[[:^graph:]]' => 'NPOSIXL[:graph:]',
+ '(?l)[[:^graph:]\x{FFFF}]' => 'NPOSIXL[:graph:]',
+ '(?u)[[:graph:]]' => 'POSIXU[:graph:]',
+ '(?u)[[:^graph:]]' => 'NPOSIXU[:graph:]',
+ '(?a)[[:graph:]]' => 'POSIXA[:graph:]',
+ '(?a)[[:^graph:]]' => 'NPOSIXA[:graph:]',
+ '(?a)[[:^graph:]\x{FFFF}]' => 'NPOSIXA[:graph:]',
+ '[[:graph:][:^graph:]]' => 'SANY',
+ '[^[:graph:][:^graph:]]' => 'OPFAIL',
+ '(?l)[[:graph:][:^graph:]]' => 'SANY',
+ '(?l)[^[:graph:][:^graph:]]' => 'OPFAIL',
+ '(?u)[[:graph:][:^graph:]]' => 'SANY',
+ '(?u)[^[:graph:][:^graph:]]' => 'OPFAIL',
+ '(?a)[[:graph:][:^graph:]]' => 'SANY',
+ '(?a)[^[:graph:][:^graph:]]' => 'OPFAIL',
+ '[[:lower:]]' => 'POSIXD[:lower:]',
+ '[[:^lower:]]' => 'NPOSIXD[:lower:]',
+ '[[:^lower:]\x{2C2}]' => 'NPOSIXU[:lower:]',
+ '(?l)[[:lower:]]' => 'POSIXL[:lower:]',
+ '(?l)[[:^lower:]]' => 'NPOSIXL[:lower:]',
+ '(?l)[[:^lower:]\x{2C2}]' => 'NPOSIXL[:lower:]',
+ '(?u)[[:lower:]]' => 'POSIXU[:lower:]',
+ '(?u)[[:^lower:]]' => 'NPOSIXU[:lower:]',
+ '(?a)[[:lower:]]' => 'POSIXA[:lower:]',
+ '(?a)[[:^lower:]]' => 'NPOSIXA[:lower:]',
+ '(?a)[[:^lower:]\x{2C2}]' => 'NPOSIXA[:lower:]',
+ '[[:lower:][:^lower:]]' => 'SANY',
+ '[^[:lower:][:^lower:]]' => 'OPFAIL',
+ '(?l)[[:lower:][:^lower:]]' => 'SANY',
+ '(?l)[^[:lower:][:^lower:]]' => 'OPFAIL',
+ '(?u)[[:lower:][:^lower:]]' => 'SANY',
+ '(?u)[^[:lower:][:^lower:]]' => 'OPFAIL',
+ '(?a)[[:lower:][:^lower:]]' => 'SANY',
+ '(?a)[^[:lower:][:^lower:]]' => 'OPFAIL',
+ '[[:print:]]' => 'POSIXD[:print:]',
+ '[[:^print:]]' => 'NPOSIXD[:print:]',
+ '[[:^print:]\x{FFFF}]' => 'NPOSIXU[:print:]',
+ '(?l)[[:print:]]' => 'POSIXL[:print:]',
+ '(?l)[[:^print:]]' => 'NPOSIXL[:print:]',
+ '(?l)[[:^print:]\x{FFFF}]' => 'NPOSIXL[:print:]',
+ '(?u)[[:print:]]' => 'POSIXU[:print:]',
+ '(?u)[[:^print:]]' => 'NPOSIXU[:print:]',
+ '(?a)[[:print:]]' => 'POSIXA[:print:]',
+ '(?a)[[:^print:]]' => 'NPOSIXA[:print:]',
+ '(?a)[[:^print:]\x{FFFF}]' => 'NPOSIXA[:print:]',
+ '[[:print:][:^print:]]' => 'SANY',
+ '[^[:print:][:^print:]]' => 'OPFAIL',
+ '(?l)[[:print:][:^print:]]' => 'SANY',
+ '(?l)[^[:print:][:^print:]]' => 'OPFAIL',
+ '(?u)[[:print:][:^print:]]' => 'SANY',
+ '(?u)[^[:print:][:^print:]]' => 'OPFAIL',
+ '(?a)[[:print:][:^print:]]' => 'SANY',
+ '(?a)[^[:print:][:^print:]]' => 'OPFAIL',
+ '[[:punct:]]' => 'POSIXD[:punct:]',
+ '[[:^punct:]]' => 'NPOSIXD[:punct:]',
+ '[[:^punct:]\x{2C2}]' => 'NPOSIXU[:punct:]',
+ '(?l)[[:punct:]]' => 'POSIXL[:punct:]',
+ '(?l)[[:^punct:]]' => 'NPOSIXL[:punct:]',
+ '(?l)[[:^punct:]\x{2C2}]' => 'NPOSIXL[:punct:]',
+ '(?u)[[:punct:]]' => 'POSIXU[:punct:]',
+ '(?u)[[:^punct:]]' => 'NPOSIXU[:punct:]',
+ '(?a)[[:punct:]]' => 'POSIXA[:punct:]',
+ '(?a)[[:^punct:]]' => 'NPOSIXA[:punct:]',
+ '(?a)[[:^punct:]\x{2C2}]' => 'NPOSIXA[:punct:]',
+ '[[:punct:][:^punct:]]' => 'SANY',
+ '[^[:punct:][:^punct:]]' => 'OPFAIL',
+ '(?l)[[:punct:][:^punct:]]' => 'SANY',
+ '(?l)[^[:punct:][:^punct:]]' => 'OPFAIL',
+ '(?u)[[:punct:][:^punct:]]' => 'SANY',
+ '(?u)[^[:punct:][:^punct:]]' => 'OPFAIL',
+ '(?a)[[:punct:][:^punct:]]' => 'SANY',
+ '(?a)[^[:punct:][:^punct:]]' => 'OPFAIL',
+ '[[:space:]]' => 'POSIXD[\s]',
+ '[[:^space:]]' => 'NPOSIXD[\s]',
+ '[[:^space:]\x{2C2}]' => 'NPOSIXU[\s]',
+ '(?l)[[:space:]]' => 'POSIXL[\s]',
+ '(?l)[[:^space:]]' => 'NPOSIXL[\s]',
+ '(?l)[[:^space:]\x{2C2}]' => 'NPOSIXL[\s]',
+ '(?u)[[:space:]]' => 'POSIXU[\s]',
+ '(?u)[[:^space:]]' => 'NPOSIXU[\s]',
+ '(?a)[[:space:]]' => 'POSIXA[\s]',
+ '(?a)[[:^space:]]' => 'NPOSIXA[\s]',
+ '(?a)[[:^space:]\x{2C2}]' => 'NPOSIXA[\s]',
+ '[[:space:][:^space:]]' => 'SANY',
+ '[^[:space:][:^space:]]' => 'OPFAIL',
+ '(?l)[[:space:][:^space:]]' => 'SANY',
+ '(?l)[^[:space:][:^space:]]' => 'OPFAIL',
+ '(?u)[[:space:][:^space:]]' => 'SANY',
+ '(?u)[^[:space:][:^space:]]' => 'OPFAIL',
+ '(?a)[[:space:][:^space:]]' => 'SANY',
+ '(?a)[^[:space:][:^space:]]' => 'OPFAIL',
+ '[[:upper:]]' => 'POSIXD[:upper:]',
+ '[[:^upper:]]' => 'NPOSIXD[:upper:]',
+ '[[:^upper:]\x{2C2}]' => 'NPOSIXU[:upper:]',
+ '(?l)[[:upper:]]' => 'POSIXL[:upper:]',
+ '(?l)[[:^upper:]]' => 'NPOSIXL[:upper:]',
+ '(?l)[[:^upper:]\x{2C2}]' => 'NPOSIXL[:upper:]',
+ '(?u)[[:upper:]]' => 'POSIXU[:upper:]',
+ '(?u)[[:^upper:]]' => 'NPOSIXU[:upper:]',
+ '(?a)[[:upper:]]' => 'POSIXA[:upper:]',
+ '(?a)[[:^upper:]]' => 'NPOSIXA[:upper:]',
+ '(?a)[[:^upper:]\x{2C2}]' => 'NPOSIXA[:upper:]',
+ '[[:upper:][:^upper:]]' => 'SANY',
+ '[^[:upper:][:^upper:]]' => 'OPFAIL',
+ '(?l)[[:upper:][:^upper:]]' => 'SANY',
+ '(?l)[^[:upper:][:^upper:]]' => 'OPFAIL',
+ '(?u)[[:upper:][:^upper:]]' => 'SANY',
+ '(?u)[^[:upper:][:^upper:]]' => 'OPFAIL',
+ '(?a)[[:upper:][:^upper:]]' => 'SANY',
+ '(?a)[^[:upper:][:^upper:]]' => 'OPFAIL',
+ '[\v]' => 'POSIXU[\v]',
+ '[^\v]' => 'NPOSIXU[\v]',
+ '[\V\x{2C2}]' => 'NPOSIXU[\v]',
+ '(?l)[\v]' => 'POSIXU[\v]',
+ '(?l)[^\v]' => 'NPOSIXU[\v]',
+ '(?l)[\V\x{2C2}]' => 'NPOSIXU[\v]',
+ '(?u)[\v]' => 'POSIXU[\v]',
+ '(?u)[^\v]' => 'NPOSIXU[\v]',
+ '(?a)[\v]' => 'POSIXU[\v]',
+ '(?a)[^\v]' => 'NPOSIXU[\v]',
+ '(?a)[\V\x{2C2}]' => 'NPOSIXU[\v]',
+ '[\v\V]' => 'SANY',
+ '[^\v\V]' => 'OPFAIL',
+ '(?l)[\v\V]' => 'SANY',
+ '(?l)[^\v\V]' => 'OPFAIL',
+ '(?u)[\v\V]' => 'SANY',
+ '(?u)[^\v\V]' => 'OPFAIL',
+ '(?a)[\v\V]' => 'SANY',
+ '(?a)[^\v\V]' => 'OPFAIL',
+ '[[:word:]]' => 'POSIXD[\w]',
+ '[[:^word:]]' => 'NPOSIXD[\w]',
+ '[[:^word:]\x{2C2}]' => 'NPOSIXU[\w]',
+ '(?l)[[:word:]]' => 'POSIXL[\w]',
+ '(?l)[[:^word:]]' => 'NPOSIXL[\w]',
+ '(?l)[[:^word:]\x{2C2}]' => 'NPOSIXL[\w]',
+ '(?u)[[:word:]]' => 'POSIXU[\w]',
+ '(?u)[[:^word:]]' => 'NPOSIXU[\w]',
+ '(?a)[[:word:]]' => 'POSIXA[\w]',
+ '(?a)[[:^word:]]' => 'NPOSIXA[\w]',
+ '(?a)[[:^word:]\x{2C2}]' => 'NPOSIXA[\w]',
+ '[[:word:][:^word:]]' => 'SANY',
+ '[^[:word:][:^word:]]' => 'OPFAIL',
+ '(?l)[[:word:][:^word:]]' => 'SANY',
+ '(?l)[^[:word:][:^word:]]' => 'OPFAIL',
+ '(?u)[[:word:][:^word:]]' => 'SANY',
+ '(?u)[^[:word:][:^word:]]' => 'OPFAIL',
+ '(?a)[[:word:][:^word:]]' => 'SANY',
+ '(?a)[^[:word:][:^word:]]' => 'OPFAIL',
+ '[[:xdigit:]]' => 'POSIXU[:xdigit:]',
+ '[[:^xdigit:]]' => 'NPOSIXU[:xdigit:]',
+ '[[:^xdigit:]\x{2C2}]' => 'NPOSIXU[:xdigit:]',
+ '(?l)[[:xdigit:]]' => 'POSIXL[:xdigit:]',
+ '(?l)[[:^xdigit:]]' => 'NPOSIXL[:xdigit:]',
+ '(?l)[[:^xdigit:]\x{2C2}]' => 'NPOSIXL[:xdigit:]',
+ '(?u)[[:xdigit:]]' => 'POSIXU[:xdigit:]',
+ '(?u)[[:^xdigit:]]' => 'NPOSIXU[:xdigit:]',
+ '(?a)[[:xdigit:]]' => 'POSIXA[:xdigit:]',
+ '(?a)[[:^xdigit:]]' => 'NPOSIXA[:xdigit:]',
+ '(?a)[[:^xdigit:]\x{2C2}]' => 'NPOSIXA[:xdigit:]',
+ '[[:xdigit:][:^xdigit:]]' => 'SANY',
+ '[^[:xdigit:][:^xdigit:]]' => 'OPFAIL',
+ '(?l)[[:xdigit:][:^xdigit:]]' => 'SANY',
+ '(?l)[^[:xdigit:][:^xdigit:]]' => 'OPFAIL',
+ '(?u)[[:xdigit:][:^xdigit:]]' => 'SANY',
+ '(?u)[^[:xdigit:][:^xdigit:]]' => 'OPFAIL',
+ '(?a)[[:xdigit:][:^xdigit:]]' => 'SANY',
+ '(?a)[^[:xdigit:][:^xdigit:]]' => 'OPFAIL',
+ '(?i)[[:lower:]]' => 'POSIXD[:cased:]',
+ '(?i)[[:^lower:]]' => 'NPOSIXD[:cased:]',
+ '(?i)[[:^lower:]\x{2C2}]' => 'NPOSIXU[:cased:]',
+ '(?i)(?l)[[:lower:]]' => 'POSIXL[:cased:]',
+ '(?i)(?l)[[:^lower:]]' => 'NPOSIXL[:cased:]',
+ '(?i)(?l)[[:^lower:]\x{2C2}]' => 'NPOSIXL[:cased:]',
+ '(?i)(?u)[[:lower:]]' => 'POSIXU[:cased:]',
+ '(?i)(?u)[[:^lower:]]' => 'NPOSIXU[:cased:]',
+ '(?i)(?a)[[:lower:]]' => 'POSIXA[:alpha:]',
+ '(?i)(?a)[[:^lower:]]' => 'NPOSIXA[:alpha:]',
+ '(?i)(?a)[[:^lower:]\x{2C2}]' => 'NPOSIXA[:alpha:]',
+ '(?i)[[:upper:]]' => 'POSIXD[:cased:]',
+ '(?i)[[:^upper:]]' => 'NPOSIXD[:cased:]',
+ '(?i)[[:^upper:]\x{2C2}]' => 'NPOSIXU[:cased:]',
+ '(?i)(?l)[[:upper:]]' => 'POSIXL[:cased:]',
+ '(?i)(?l)[[:^upper:]]' => 'NPOSIXL[:cased:]',
+ '(?i)(?l)[[:^upper:]\x{2C2}]' => 'NPOSIXL[:cased:]',
+ '(?i)(?u)[[:upper:]]' => 'POSIXU[:cased:]',
+ '(?i)(?u)[[:^upper:]]' => 'NPOSIXU[:cased:]',
+ '(?i)(?a)[[:upper:]]' => 'POSIXA[:alpha:]',
+ '(?i)(?a)[[:^upper:]]' => 'NPOSIXA[:alpha:]',
+ '(?i)(?a)[[:^upper:]\x{2C2}]' => 'NPOSIXA[:alpha:]',
+ '(?i)[\d\w]' => 'POSIXD[\w]',
+ '(?i)[\D\w]' => 'SANY',
+ #'(?i)(?l)[\d\w]' => varies depending on Unicode release
+ '(?i)(?l)[\D\w]' => 'ANYOFPOSIXL{i}[\\w\\D][0100-INFTY]',
+ '(?i)(?u)[\d\w]' => 'POSIXU[\w]',
+ '(?i)(?u)[\D\w]' => 'SANY',
+ '(?i)(?a)[\d\w]' => 'POSIXA[\w]',
+ '(?i)(?a)[\D\w]' => 'SANY',
'(?l:[\x{212A}])' => 'ANYOFL[212A]',
- '(?l:[\s\x{212A}])' => 'ANYOFL[\s][1680 2000-200A 2028-2029 202F 205F 212A 3000]',
- '(?l:[^\S\x{202F}])' => 'ANYOFL[^\\S][1680 2000-200A 2028-2029 205F 3000]',
- '(?i:[^:])' => 'ANYOF[^:][0100-INFINITY]',
+ '(?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}]',
+
+ '\p{All}' => 'SANY',
+ '\P{All}' => 'OPFAIL',
'[\p{Any}]' => 'ANYOF[\x00-\xFF][0100-10FFFF]',
- '[\p{IsMyRuntimeProperty}]' => 'ANYOF[+utf8::IsMyRuntimeProperty]',
- '[^\p{IsMyRuntimeProperty}]' => 'ANYOF[^{+utf8::IsMyRuntimeProperty}]',
- '[a\p{IsMyRuntimeProperty}]' => 'ANYOF[a][+utf8::IsMyRuntimeProperty]',
- '[^a\p{IsMyRuntimeProperty}]' => 'ANYOF[^a{+utf8::IsMyRuntimeProperty}]',
- '[^a\x{100}\p{IsMyRuntimeProperty}]' => 'ANYOF[^a{+utf8::IsMyRuntimeProperty}0100]',
- '[{INFINITY_minus_1}]' => 'ANYOF[INFINITY_minus_1]',
- '[{INFINITY}]' => 'ANYOF[INFINITY-INFINITY]',
- '[\x{102}\x{104}]' => 'ANYOF[0102 0104]',
- '[\x{104}\x{102}]' => 'ANYOF[0102 0104]',
- '[\x{103}\x{102}]' => 'ANYOF[0102-0103]',
- '[\x{00}-{INFINITY_minus_1}]' => 'ANYOF[\x00-\xFF][0100-INFINITY_minus_1]',
- '[\x{00}-{INFINITY}]' => 'SANY',
- '[\x{101}-{INFINITY_minus_1}]' => 'ANYOF[0101-INFINITY_minus_1]',
- '[\x{101}-{INFINITY}]' => 'ANYOF[0101-INFINITY]',
- '[\x{104}\x{102}\x{103}]' => 'ANYOF[0102-0104]',
- '[\x{102}-\x{104}\x{101}]' => 'ANYOF[0101-0104]',
- '[\x{102}-\x{104}\x{102}]' => 'ANYOF[0102-0104]',
- '[\x{102}-\x{104}\x{103}]' => 'ANYOF[0102-0104]',
- '[\x{102}-\x{104}\x{104}]' => 'ANYOF[0102-0104]',
- '[\x{102}-\x{104}\x{105}]' => 'ANYOF[0102-0105]',
- '[\x{102}-\x{104}\x{106}]' => 'ANYOF[0102-0104 0106]',
- '[\x{102}-\x{104}{INFINITY_minus_1}]' => 'ANYOF[0102-0104 INFINITY_minus_1]',
- '[\x{102}-\x{104}{INFINITY}]' => 'ANYOF[0102-0104 INFINITY-INFINITY]',
- '[\x{102}-\x{104}\x{101}-{INFINITY_minus_1}]' => 'ANYOF[0101-INFINITY_minus_1]',
- '[\x{102}-\x{104}\x{101}-{INFINITY}]' => 'ANYOF[0101-INFINITY]',
- '[\x{102}-\x{104}\x{102}-{INFINITY_minus_1}]' => 'ANYOF[0102-INFINITY_minus_1]',
- '[\x{102}-\x{104}\x{102}-{INFINITY}]' => 'ANYOF[0102-INFINITY]',
- '[\x{102}-\x{104}\x{103}-{INFINITY_minus_1}]' => 'ANYOF[0102-INFINITY_minus_1]',
- '[\x{102}-\x{104}\x{103}-{INFINITY}]' => 'ANYOF[0102-INFINITY]',
- '[\x{102}-\x{104}\x{104}-{INFINITY_minus_1}]' => 'ANYOF[0102-INFINITY_minus_1]',
- '[\x{102}-\x{104}\x{104}-{INFINITY}]' => 'ANYOF[0102-INFINITY]',
- '[\x{102}-\x{104}\x{105}-{INFINITY_minus_1}]' => 'ANYOF[0102-INFINITY_minus_1]',
- '[\x{102}-\x{104}\x{105}-{INFINITY}]' => 'ANYOF[0102-INFINITY]',
- '[\x{102}-\x{104}\x{106}-{INFINITY_minus_1}]' => 'ANYOF[0102-0104 0106-INFINITY_minus_1]',
- '[\x{102}-\x{104}\x{106}-{INFINITY}]' => 'ANYOF[0102-0104 0106-INFINITY]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}]' => 'ANYOF[0101-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}]' => 'ANYOF[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}]' => 'ANYOF[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}]' => 'ANYOF[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}]' => 'ANYOF[0102-0105 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}]' => 'ANYOF[0102-0104 0106 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{107}]' => 'ANYOF[0102-0104 0107-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{108}]' => 'ANYOF[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{109}]' => 'ANYOF[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{10A}]' => 'ANYOF[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{10B}]' => 'ANYOF[0102-0104 0108-010B]',
- '[\x{102}-\x{104}\x{108}-\x{10A}{INFINITY_minus_1}]' => 'ANYOF[0102-0104 0108-010A INFINITY_minus_1]',
- '[\x{102}-\x{104}\x{108}-\x{10A}{INFINITY}]' => 'ANYOF[0102-0104 0108-010A INFINITY-INFINITY]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{102}]' => 'ANYOF[0101-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{103}]' => 'ANYOF[0101-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{104}]' => 'ANYOF[0101-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{105}]' => 'ANYOF[0101-0105 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{106}]' => 'ANYOF[0101-0106 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{107}]' => 'ANYOF[0101-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{108}]' => 'ANYOF[0101-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{109}]' => 'ANYOF[0101-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10A}]' => 'ANYOF[0101-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10B}]' => 'ANYOF[0101-010B]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{INFINITY_minus_1}]' => 'ANYOF[0101-INFINITY_minus_1]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{INFINITY}]' => 'ANYOF[0101-INFINITY]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{102}]' => 'ANYOF[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{103}]' => 'ANYOF[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{104}]' => 'ANYOF[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{105}]' => 'ANYOF[0102-0105 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{106}]' => 'ANYOF[0102-0106 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{107}]' => 'ANYOF[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{108}]' => 'ANYOF[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{109}]' => 'ANYOF[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10A}]' => 'ANYOF[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10B}]' => 'ANYOF[0102-010B]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10C}]' => 'ANYOF[0102-010C]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{INFINITY_minus_1}]' => 'ANYOF[0102-INFINITY_minus_1]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{INFINITY}]' => 'ANYOF[0102-INFINITY]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}]' => 'ANYOF[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{104}]' => 'ANYOF[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{105}]' => 'ANYOF[0102-0105 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{106}]' => 'ANYOF[0102-0106 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{107}]' => 'ANYOF[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{108}]' => 'ANYOF[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{109}]' => 'ANYOF[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10A}]' => 'ANYOF[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10B}]' => 'ANYOF[0102-010B]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10C}]' => 'ANYOF[0102-010C]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{INFINITY_minus_1}]' => 'ANYOF[0102-INFINITY_minus_1]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{INFINITY}]' => 'ANYOF[0102-INFINITY]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}]' => 'ANYOF[0102-0104 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{105}]' => 'ANYOF[0102-0105 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{106}]' => 'ANYOF[0102-0106 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{107}]' => 'ANYOF[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{108}]' => 'ANYOF[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{109}]' => 'ANYOF[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10A}]' => 'ANYOF[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10B}]' => 'ANYOF[0102-010B]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10C}]' => 'ANYOF[0102-010C]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{INFINITY_minus_1}]' => 'ANYOF[0102-INFINITY_minus_1]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{INFINITY}]' => 'ANYOF[0102-INFINITY]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}]' => 'ANYOF[0102-0105 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{106}]' => 'ANYOF[0102-0106 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{107}]' => 'ANYOF[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{108}]' => 'ANYOF[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{109}]' => 'ANYOF[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10A}]' => 'ANYOF[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10B}]' => 'ANYOF[0102-010B]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10C}]' => 'ANYOF[0102-010C]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{INFINITY_minus_1}]' => 'ANYOF[0102-INFINITY_minus_1]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{INFINITY}]' => 'ANYOF[0102-INFINITY]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}]' => 'ANYOF[0102-0104 0106 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{107}]' => 'ANYOF[0102-0104 0106-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{108}]' => 'ANYOF[0102-0104 0106-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{109}]' => 'ANYOF[0102-0104 0106-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10A}]' => 'ANYOF[0102-0104 0106-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10B}]' => 'ANYOF[0102-0104 0106-010B]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10C}]' => 'ANYOF[0102-0104 0106-010C]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{INFINITY_minus_1}]' => 'ANYOF[0102-0104 0106-INFINITY_minus_1]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{INFINITY}]' => 'ANYOF[0102-0104 0106-INFINITY]',
- '[\x{10C}-{INFINITY}{INFINITY_minus_1}]' => 'ANYOF[010C-INFINITY]',
- '[\x{10C}-{INFINITY}{INFINITY}]' => 'ANYOF[010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}\x{104}]' => 'ANYOF[0102 0104 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{104}\x{102}]' => 'ANYOF[0102 0104 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{103}\x{102}]' => 'ANYOF[0102-0103 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{00}-{INFINITY_minus_1}]' => 'SANY',
- '[\x{10C}-{INFINITY}\x{00}-{INFINITY}]' => 'SANY',
- '[\x{10C}-{INFINITY}\x{101}-{INFINITY_minus_1}]' => 'ANYOF[0101-INFINITY]',
- '[\x{10C}-{INFINITY}\x{101}-{INFINITY}]' => 'ANYOF[0101-INFINITY]',
- '[\x{10C}-{INFINITY}\x{104}\x{102}\x{103}]' => 'ANYOF[0102-0104 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{101}]' => 'ANYOF[0101-0104 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{102}]' => 'ANYOF[0102-0104 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{103}]' => 'ANYOF[0102-0104 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{104}]' => 'ANYOF[0102-0104 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{105}]' => 'ANYOF[0102-0105 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{106}]' => 'ANYOF[0102-0104 0106 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}{INFINITY_minus_1}]' => 'ANYOF[0102-0104 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}{INFINITY}]' => 'ANYOF[0102-0104 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{101}-{INFINITY_minus_1}]' => 'ANYOF[0101-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{101}-{INFINITY}]' => 'ANYOF[0101-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{102}-{INFINITY_minus_1}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{102}-{INFINITY}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{103}-{INFINITY_minus_1}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{103}-{INFINITY}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{104}-{INFINITY_minus_1}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{104}-{INFINITY}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{105}-{INFINITY_minus_1}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{105}-{INFINITY}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{106}-{INFINITY_minus_1}]' => 'ANYOF[0102-0104 0106-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{106}-{INFINITY}]' => 'ANYOF[0102-0104 0106-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}]' => 'ANYOF[0101-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}]' => 'ANYOF[0102-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}]' => 'ANYOF[0102-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}]' => 'ANYOF[0102-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}]' => 'ANYOF[0102-0105 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}]' => 'ANYOF[0102-0104 0106 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{107}]' => 'ANYOF[0102-0104 0107-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{108}]' => 'ANYOF[0102-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{109}]' => 'ANYOF[0102-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{10A}]' => 'ANYOF[0102-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{10B}]' => 'ANYOF[0102-0104 0108-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}{INFINITY_minus_1}]' => 'ANYOF[0102-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}{INFINITY}]' => 'ANYOF[0102-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{102}]' => 'ANYOF[0101-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{103}]' => 'ANYOF[0101-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{104}]' => 'ANYOF[0101-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{105}]' => 'ANYOF[0101-0105 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{106}]' => 'ANYOF[0101-0106 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{107}]' => 'ANYOF[0101-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{108}]' => 'ANYOF[0101-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{109}]' => 'ANYOF[0101-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10A}]' => 'ANYOF[0101-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10B}]' => 'ANYOF[0101-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{INFINITY_minus_1}]' => 'ANYOF[0101-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{INFINITY}]' => 'ANYOF[0101-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{102}]' => 'ANYOF[0102-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{103}]' => 'ANYOF[0102-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{104}]' => 'ANYOF[0102-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{105}]' => 'ANYOF[0102-0105 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{106}]' => 'ANYOF[0102-0106 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{107}]' => 'ANYOF[0102-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{108}]' => 'ANYOF[0102-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{109}]' => 'ANYOF[0102-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10A}]' => 'ANYOF[0102-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10B}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10C}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{INFINITY_minus_1}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{INFINITY}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}]' => 'ANYOF[0102-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{104}]' => 'ANYOF[0102-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{105}]' => 'ANYOF[0102-0105 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{106}]' => 'ANYOF[0102-0106 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{107}]' => 'ANYOF[0102-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{108}]' => 'ANYOF[0102-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{109}]' => 'ANYOF[0102-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10A}]' => 'ANYOF[0102-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10B}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10C}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{INFINITY_minus_1}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{INFINITY}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}]' => 'ANYOF[0102-0104 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{105}]' => 'ANYOF[0102-0105 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{106}]' => 'ANYOF[0102-0106 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{107}]' => 'ANYOF[0102-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{108}]' => 'ANYOF[0102-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{109}]' => 'ANYOF[0102-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10A}]' => 'ANYOF[0102-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10B}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10C}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{INFINITY_minus_1}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{INFINITY}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}]' => 'ANYOF[0102-0105 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{106}]' => 'ANYOF[0102-0106 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{107}]' => 'ANYOF[0102-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{108}]' => 'ANYOF[0102-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{109}]' => 'ANYOF[0102-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10A}]' => 'ANYOF[0102-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10B}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10C}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{INFINITY_minus_1}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{INFINITY}]' => 'ANYOF[0102-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}]' => 'ANYOF[0102-0104 0106 0108-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{107}]' => 'ANYOF[0102-0104 0106-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{108}]' => 'ANYOF[0102-0104 0106-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{109}]' => 'ANYOF[0102-0104 0106-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10A}]' => 'ANYOF[0102-0104 0106-010A 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10B}]' => 'ANYOF[0102-0104 0106-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10C}]' => 'ANYOF[0102-0104 0106-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{INFINITY_minus_1}]' => 'ANYOF[0102-0104 0106-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{INFINITY}]' => 'ANYOF[0102-0104 0106-INFINITY]',
- '[\x{106}-{INFINITY}\x{104}]' => 'ANYOF[0104 0106-INFINITY]',
- '[\x{106}-{INFINITY}\x{105}]' => 'ANYOF[0105-INFINITY]',
- '[\x{106}-{INFINITY}\x{106}]' => 'ANYOF[0106-INFINITY]',
- '[\x{106}-{INFINITY}\x{107}]' => 'ANYOF[0106-INFINITY]',
- '[\x{106}-{INFINITY}\x{104}-\x{105}]' => 'ANYOF[0104-INFINITY]',
- '[\x{106}-{INFINITY}\x{104}-\x{106}]' => 'ANYOF[0104-INFINITY]',
- '[\x{106}-{INFINITY}\x{104}-\x{107}]' => 'ANYOF[0104-INFINITY]',
- '[\x{106}-{INFINITY}\x{104}-{INFINITY_minus_1}]' => 'ANYOF[0104-INFINITY]',
- '[\x{106}-{INFINITY}\x{104}-{INFINITY}]' => 'ANYOF[0104-INFINITY]',
- '[\x{106}-{INFINITY}\x{105}-\x{106}]' => 'ANYOF[0105-INFINITY]',
- '[\x{106}-{INFINITY}\x{105}-\x{107}]' => 'ANYOF[0105-INFINITY]',
- '[\x{106}-{INFINITY}\x{105}-{INFINITY_minus_1}]' => 'ANYOF[0105-INFINITY]',
- '[\x{106}-{INFINITY}\x{105}-{INFINITY}]' => 'ANYOF[0105-INFINITY]',
- '[\x{106}-{INFINITY}\x{106}-\x{107}]' => 'ANYOF[0106-INFINITY]',
- '[\x{106}-{INFINITY}\x{106}-{INFINITY_minus_1}]' => 'ANYOF[0106-INFINITY]',
- '[\x{106}-{INFINITY}\x{106}-{INFINITY}]' => 'ANYOF[0106-INFINITY]',
- '[\x{106}-{INFINITY}\x{107}-\x{107}]' => 'ANYOF[0106-INFINITY]',
- '[\x{106}-{INFINITY}\x{107}-{INFINITY_minus_1}]' => 'ANYOF[0106-INFINITY]',
- '[\x{106}-{INFINITY}\x{107}-{INFINITY}]' => 'ANYOF[0106-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{100}]' => 'ANYOF[0100 0102-0104 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{101}]' => 'ANYOF[0101-0104 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{102}]' => 'ANYOF[0102-0104 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{103}]' => 'ANYOF[0102-0104 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{104}]' => 'ANYOF[0102-0104 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{105}]' => 'ANYOF[0102-0105 010C-INFINITY]',
- '[\x{10C}-{INFINITY}\x{102}-\x{104}\x{106}]' => 'ANYOF[0102-0104 0106 010C-INFINITY]',
+
+ '[\p{IsMyRuntimeProperty}]' => 'ANYOF[+main::IsMyRuntimeProperty]',
+ '[^\p{IsMyRuntimeProperty}]' => 'ANYOF[^{+main::IsMyRuntimeProperty}]',
+ '[a\p{IsMyRuntimeProperty}]' => 'ANYOF[a][+main::IsMyRuntimeProperty]',
+ '[^a\p{IsMyRuntimeProperty}]' => 'ANYOF[^a{+main::IsMyRuntimeProperty}]',
+ '[^a\x{100}\p{IsMyRuntimeProperty}]' => 'ANYOF[^a{+main::IsMyRuntimeProperty}0100]',
+ '[^\p{All}\p{IsMyRuntimeProperty}]' => 'OPFAIL',
+ '[\p{All}\p{IsMyRuntimeProperty}]' => 'SANY',
+
+ '[\x{00}-{INFTY_minus_1}]' => 'ANYOF[\x00-\xFF][0100-INFTY_minus_1]',
+ '[\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{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{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{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{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{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{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{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{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{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{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{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{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{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}-\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}-\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}-\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}-\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}\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{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}\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{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{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{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{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{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{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}-\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]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{105}]' => 'ANYOFH[0101-0105 0108-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{106}]' => 'ANYOFH[0101-0106 0108-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{107}]' => 'ANYOFH[0101-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{108}]' => 'ANYOFH[0101-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{109}]' => 'ANYOFH[0101-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10A}]' => 'ANYOFH[0101-010A 010C-INFTY]',
+ '[\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}-\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]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{105}]' => 'ANYOFH[0102-0105 0108-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{106}]' => 'ANYOFH[0102-0106 0108-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{107}]' => 'ANYOFH[0102-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{108}]' => 'ANYOFH[0102-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{109}]' => 'ANYOFH[0102-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10A}]' => 'ANYOFH[0102-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10B}]' => 'ANYOFH[0102-INFTY]',
+ '[\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}-\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]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{107}]' => 'ANYOFH[0102-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{108}]' => 'ANYOFH[0102-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{109}]' => 'ANYOFH[0102-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10A}]' => 'ANYOFH[0102-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10B}]' => 'ANYOFH[0102-INFTY]',
+ '[\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}-\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]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{108}]' => 'ANYOFH[0102-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{109}]' => 'ANYOFH[0102-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10A}]' => 'ANYOFH[0102-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10B}]' => 'ANYOFH[0102-INFTY]',
+ '[\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}-\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]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{109}]' => 'ANYOFH[0102-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10A}]' => 'ANYOFH[0102-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10B}]' => 'ANYOFH[0102-INFTY]',
+ '[\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}-\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]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10A}]' => 'ANYOFH[0102-0104 0106-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10B}]' => 'ANYOFH[0102-0104 0106-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10C}]' => 'ANYOFH[0102-0104 0106-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{107}]' => 'ANYOFH[0102-0104 0107-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{108}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{109}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{10A}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
+ '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{10B}]' => 'ANYOFH[0102-0104 0108-INFTY]',
+ '[\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]',
+
+ '(?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
+
+ '(?i)[\x{1E9E}]' => 'EXACTFU <ss>',
+ '(?iaa)[\x{1E9E}]' => 'EXACTFAA <\x{17f}\x{17f}>',
+ '(?i)[\x{FB00}]' => 'EXACTFU <ff>',
+ '(?iaa)[\x{FB00}]' => 'ANYOFH[FB00]',
+ '(?i)[\x{FB00}]' => 'EXACTFU <ff>',
+ '(?i)[\x{FB01}]' => 'EXACTFU <fi>',
+ '(?i)[\x{FB02}]' => 'EXACTFU <fl>',
+ '(?i)[\x{FB03}]' => 'EXACTFU <ffi>',
+ '(?i)[\x{FB04}]' => 'EXACTFU <ffl>',
+ '(?i)[\x{FB05}]' => 'EXACTFU <st>',
+ '(?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>',
+ '(?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[s]' => 'EXACTFU <bs>',
+ '(?i)b[s]c' => 'EXACTFU <bsc>',
+ '(?i)bs[s]c' => 'EXACTF <bss>', # The c goes into a 2nd node
+ '(?iu)bs[s]c' => 'EXACTFUP <bssc>',
+ '(?i)b[s]sc' => 'EXACTF <bssc>',
+ '(?iu)b[s]sc' => 'EXACTFUP <bssc>',
+ '(?i)[b]st' => 'EXACTFU <bst>',
+ '(?i)[b]st[s]' => 'EXACTFU <bsts>',
+ '(?i)[b]st[s]st' => 'EXACTF <bstsst>',
+ '(?iu)[b]st[s]st' => 'EXACTFUP <bstsst>',
+ '(?i)[s][s]' => 'EXACTF <ss>',
+ '(?iu)[s][s]' => 'EXACTFUP <ss>',
);
-# 2**32-1 or 2**64-1
-my $highest_cp_string = "F" x (($Config{uvsize} < 8) ? 8 : 16);
+my @single_chars_to_test =
+(
+ "\x00", # Always potentially problematic
+ "\x01", # Unnamed control
+ "\b", # Named control
+ "\n", # Potentially special
+ "\r", # Potentially special
+ "\cK", # Potentially special
+ "0", # Digit
+ ":", # Not in any fold
+ "A", # ASCII capital, participates in multi-char fold
+ "a", # ASCII small, participates in multi-char fold
+ "B", # ASCII capital, participates only in case-pair fold
+ "b", # ASCII small, participates only in case-pair fold
+ "K", # ASCII capital, folded to from above Latin1
+ "k", # ASCII small, folded to from above Latin1
+ "\c?", # Potentially special
+ "\x80", # Latin1 control
+ "\xB5", # Micro sign, folds to above Latin1
+ "\xC0", # Latin1 capital, participates only in case-pair fold
+ "\xE0", # Latin1 small, participates only in case-pair fold
+ "\xC5", # Latin1 capital, folded to from above Latin1
+ "\xE5", # Latin1 small, folded to from above Latin1
+ "\xDF", # Small sharp S. folds to 'ss'
+ "\xF7", # Doesn't participate in any fold
+ "\xFF", # Folded to by above Latin1
+ "\x{100}", # First few above Latin1 characters
+ "\x{101}",
+ "\x{102}",
+ "\x{103}",
+ "\x{104}",
+ "\x{105}",
+ "\x{106}",
+ "\x{107}",
+ "\x{108}",
+);
-my $next_highest_cp_string = $highest_cp_string =~ s/ F $ /E/xr;
+my @single_tests;
+for my $char (@single_chars_to_test) {
+ my $cp = ord $char;
+ my $hex = sprintf "%02x", $cp;
+ my $oct = sprintf "%o", $cp;
+ my $cp_string;
-my $highest_cp = "\\x{$highest_cp_string}";
-my $next_highest_cp = "\\x{$next_highest_cp_string}";
+ my $cased;
+ my $folded_hex;
+
+ {
+ use feature 'unicode_strings';
+ $cased = uc $char ne $char || lc $char ne $char;
+ $folded_hex = ($cased)
+ ? sprintf("%02x", ord lc $char)
+ : $hex;
+ #print STDERR "$hex, $folded_hex\n";
+ }
+
+ for my $fold ("", "i") {
+ #next unless $fold;
+ for my $charset ("", "u", "l", "aa") {
+ #next if $charset eq "aa" && ! $fold;
+
+ my $modifiers = $fold . $charset;
+ $modifiers = "(?$modifiers)" if $modifiers;
+
+ for my $upgrade ("", "(?8)") {
+ push @single_tests, "$upgrade$modifiers\[\\x{$hex}\]";
+ if ($cp < 256 || $upgrade) {
+ push @single_tests, get_compiled("$upgrade$modifiers\\x{$hex}");
+ }
+ else {
+ my $interior = "";
+ my @list = $cp;
+ if ($fold) {
+ if (lc $char ne $char) {
+ push @list, ord lc $char;
+ }
+ elsif (uc $char ne $char) {
+ push @list, ord uc $char;
+ }
+ }
+ @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];
+ }
+ else {
+ die join ", ", @list;
+ }
+ my $anyof = ($charset eq "l") ? "ANYOFL" : "ANYOFH";
+ push @single_tests, "$anyof\[$interior\]";
+ }
+ }
+ }
+ }
+}
+
+unshift @tests, @single_tests;
plan(scalar (@tests - 1) / 2); # -1 because of the marker.
@@ -331,40 +867,18 @@ while (defined (my $test = shift @tests)) {
skip("test not ported to EBCDIC", 1) if $skip_ebcdic;
my $display_expected = $expected
- =~ s/ INFINITY_minus_1 /$next_highest_cp/xgr;
+ =~ s/ INFTY_minus_1 /$next_highest_cp/xgr;
+ my $test_name = "Verify compilation of $test displays as"
+ . " $display_expected";
- # Convert platform-independent values to what is suitable for the
- # platform
- $test =~ s/\{INFINITY\}/$highest_cp/g;
- $test =~ s/\{INFINITY_minus_1\}/$next_highest_cp/g;
-
- $test = "qr/$test/";
- my $actual_test = "use re qw(Debug COMPILE); $test";
-
- my $result = fresh_perl($actual_test);
- if ($? != 0) { # Re-run so as to display STDERR.
- fail($test);
- fresh_perl($actual_test, { stderr => 0, verbose => 1 });
- next;
+ my $result = get_compiled($test);
+ if ($expected =~ / ^ ANYOFH /x) {
+ like($result, qr/ ^ \Q$expected\E (?:\Q (First UTF-8 byte=\x\E
+ [[:xdigit:]]{2}\) )? $ /x, $test_name);
}
-
- # The Debug output will come back as a bunch of lines. We are
- # interested only in the line after /Final program/
- my @lines = split /\n/, $result;
- while (defined ($_ = shift @lines)) {
- next unless /Final program/;
- $_ = shift @lines;
-
- s/ \s* \( \d+ \) \s* //x; # Get rid of the node branch
- s/ ^ \s* \d+ : \s* //x; # ... And the node number
-
- # Use platform-independent values
- s/$highest_cp_string/INFINITY/g;
- s/$next_highest_cp_string/INFINITY_minus_1/g;
-
- is($_, $expected,
- "Verify compilation of $test displays as $display_expected");
- last; # Discard the rest of this test's output
+ else {
+ is($result, $expected,
+ "Verify compilation of $test displays as $test_name");
}
}
}
diff --git a/gnu/usr.bin/perl/t/re/fold_grind.pl b/gnu/usr.bin/perl/t/re/fold_grind.pl
new file mode 100644
index 00000000000..fb0d3620e88
--- /dev/null
+++ b/gnu/usr.bin/perl/t/re/fold_grind.pl
@@ -0,0 +1,1058 @@
+# Grind out a lot of combinatoric tests for folding.
+# It uses various charset modifiers, passed in via $::TEST_CHUNK. The caller
+# will also have set the locale to use if /l is the modifier.
+# L is a pseudo-modifier that indicates to use the modifier /l instead, and
+# the locale set by the caller is known to be UTF-8,
+# T is a pseudo-modifier that indicates to use the pseudo modifier /L
+# instead, and the locale set by the caller is known to be Turkic UTF-8,
+
+binmode STDOUT, ":utf8";
+
+BEGIN {
+ chdir 't' if -d 't';
+ require './test.pl';
+ set_up_inc('../lib');
+ require Config; import Config;
+ skip_all_if_miniperl("no dynamic loading on miniperl, no Encode nor POSIX");
+ if ($^O eq 'dec_osf') {
+ skip_all("$^O cannot handle this test");
+ }
+ my $time_out_factor = $ENV{PERL_TEST_TIME_OUT_FACTOR} || 1;
+ $time_out_factor = 1 if $time_out_factor < 1;
+
+ watchdog(5 * 60 * $time_out_factor);
+ require './loc_tools.pl';
+}
+
+use charnames ":full";
+
+my $DEBUG = 0; # Outputs extra information for debugging this .t
+
+use strict;
+use warnings;
+no warnings 'locale'; # Plenty of these would otherwise get generated
+use Encode;
+use POSIX;
+
+my $charset = $::TEST_CHUNK;
+my $use_turkic_rules = 0;
+
+if ($charset eq 'T') {
+ $charset = 'L';
+ $use_turkic_rules = 1;
+}
+
+# Special-cased characters in the .c's that we want to make sure get tested.
+my %be_sure_to_test = (
+ chr utf8::unicode_to_native(0xDF) => 1, # LATIN_SMALL_LETTER_SHARP_S
+ "\x{1E9E}" => 1, # LATIN_CAPITAL_LETTER_SHARP_S
+ "\x{390}" => 1, # GREEK_SMALL_LETTER_IOTA_WITH_DIALYTIKA_AND_TONOS
+ "\x{3B0}" => 1, # GREEK_SMALL_LETTER_UPSILON_WITH_DIALYTIKA_AND_TONOS
+ "\x{1FD3}" => 1, # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
+ "\x{1FE3}" => 1, # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA
+ "I" => 1,
+);
+
+# Tests both unicode and not, so make sure not implicitly testing unicode
+no feature 'unicode_strings';
+
+# Case-insensitive matching is a large and complicated issue. Perl does not
+# implement it fully, properly. For example, it doesn't include normalization
+# as part of the equation. To test every conceivable combination is clearly
+# impossible; these tests are mostly drawn from visual inspection of the code
+# and experience, trying to exercise all areas.
+
+# There are three basic ranges of characters that Perl may treat differently:
+# 1) Invariants under utf8 which on ASCII-ish machines are ASCII, and are
+# referred to here as ASCII. On EBCDIC machines, the non-ASCII invariants
+# are all controls that fold to themselves.
+my $ASCII = 1;
+
+# 2) Other characters that fit into a byte but are different in utf8 than not;
+# here referred to, taking some liberties, as Latin1.
+my $Latin1 = 2;
+
+# 3) Characters that won't fit in a byte; here referred to as Unicode
+my $Unicode = 3;
+
+# Within these basic groups are equivalence classes that testing any character
+# in is likely to lead to the same results as any other character. This is
+# used to cut down the number of tests needed, unless PERL_RUN_SLOW_TESTS is
+# set.
+my $skip_apparently_redundant = ! $ENV{PERL_RUN_SLOW_TESTS};
+
+# Additionally parts of this test run a lot of subtests, outputting the
+# resulting TAP can be expensive so the tests are summarised internally. The
+# PERL_DEBUG_FULL_TEST environment variable can be set to produce the full
+# output for debugging purposes.
+
+sub range_type {
+ my $ord = ord shift;
+
+ return $ASCII if utf8::native_to_unicode($ord) < 128;
+ return $Latin1 if $ord < 256;
+ return $Unicode;
+}
+
+sub numerically {
+ return $a <=> $b
+}
+
+my $list_all_tests = $ENV{PERL_DEBUG_FULL_TEST} || $DEBUG;
+$| = 1 if $list_all_tests;
+
+# Significant time is saved by not outputting each test but grouping the
+# output into subtests
+my $okays; # Number of ok's in current subtest
+my $this_iteration; # Number of possible tests in current subtest
+my $count = 0; # Number of subtests = number of total tests
+
+sub run_test($$$$) {
+ my ($test, $todo, $do_we_output_locale_name, $debug) = @_;
+
+ $debug = "" unless $DEBUG;
+ my $res = eval $test;
+
+ if ($do_we_output_locale_name) {
+ $do_we_output_locale_name = 'setlocale(LC_CTYPE, "'
+ . POSIX::setlocale(&POSIX::LC_CTYPE)
+ . '"); ';
+ }
+ if (!$res || $list_all_tests) {
+ # Failed or debug; output the result
+ $count++;
+ ok($res, "$do_we_output_locale_name$test; $debug");
+ } else {
+ # Just count the test as passed
+ $okays++;
+ }
+ $this_iteration++;
+}
+
+my %has_test_by_participants; # Makes sure has tests for each range and each
+ # number of characters that fold to the same
+ # thing
+my %has_test_by_byte_count; # Makes sure has tests for each combination of
+ # n bytes folds to m bytes
+
+my %tests; # The set of tests we expect to pass.
+# Each key is a code point that folds to something else.
+# Each value is a list of things that the key folds to. If the 'thing' is a
+# single code point, it is that ordinal. If it is a multi-char fold, it is an
+# ordered list of the code points in that fold. Here's an example for 'S':
+# '83' => [ 115, 383 ]
+#
+# And one for a multi-char fold: \xDF
+# 223 => [
+# [ # 'ss'
+# 83,
+# 83
+# ],
+# [ # 'SS'
+# 115,
+# 115
+# ],
+# [ # LATIN SMALL LETTER LONG S
+# 383,
+# 383
+# ],
+# 7838 # LATIN_CAPITAL_LETTER_SHARP_S
+# ],
+
+my %neg_tests; # Same format, but we expect these tests to fail
+
+my %folds; # keys are code points that fold; values are either 0 or 1 which
+ # in turn are keys with their values each a list of code points the
+ # code point key folds to. The folds under 1 are the ones that are
+ # valid in this run; the ones under 0 are ones valid under other
+ # circumstances.
+
+my %inverse_folds; # keys are strings of the folded-to; then come a layer of
+ # 0 or 1, like %folds. The lowest values are lists of
+ # characters that fold to them
+
+# Here's a portion of an %inverse_folds in a run where Turkic folds are not
+# legal, so \x{130} doesn't fold to 'i' in this run.
+# 'h' => {
+# '1' => [
+# 'H'
+# ]
+# },
+# "h\x{331}" => {
+# '1' => [
+# "\x{1e96}"
+# ]
+# },
+# 'i' => {
+# '0' => [
+# "\x{130}"
+# ],
+# '1' => [
+# 'I'
+# ]
+# },
+# "i\x{307}" => {
+# '1' => [
+# "\x{130}"
+# ]
+# },
+# 'j' => {
+# '1' => [
+# 'J'
+# ]
+# },
+
+sub add_test($$@) {
+ my ($tests_ref, $to, @from) = @_;
+
+ # Called to cause the input to be tested by adding to $%tests_ref. @from
+ # is the list of characters that fold to the string $to. @from should be
+ # sorted so the lowest code point is first....
+ # The input is in string form; %tests uses code points, so have to
+ # convert.
+
+ my $to_chars = length $to;
+ my @test_to; # List of tests for $to
+
+ if ($to_chars == 1) {
+ @test_to = ord $to;
+ }
+ else {
+ push @test_to, [ map { ord $_ } split "", $to ];
+
+ # For multi-char folds, we also test that things that can fold to each
+ # individual character in the fold also work. If we were testing
+ # comprehensively, we would try every combination of upper and lower
+ # case in the fold, but it will have to suffice to avoid running
+ # forever to make sure that each thing that folds to these is tested
+ # at least once. Because of complement matching ([^...]), we need to
+ # do both the folded, and the folded-from.
+ # We first look at each character in the multi-char fold, and save how
+ # many characters fold to it; and also the maximum number of such
+ # folds
+ my @folds_to_count; # 0th char in fold is index 0 ...
+ my $max_folds_to = 0;
+
+ for (my $i = 0; $i < $to_chars; $i++) {
+ my $to_char = substr($to, $i, 1);
+ if (exists $inverse_folds{$to_char}{1}) {
+ $folds_to_count[$i] = scalar @{$inverse_folds{$to_char}{1}};
+ $max_folds_to = $folds_to_count[$i] if $max_folds_to < $folds_to_count[$i];
+ }
+ else {
+ $folds_to_count[$i] = 0;
+ }
+ }
+
+ # We will need to generate as many tests as the maximum number of
+ # folds, so that each fold will have at least one test.
+ # For example, consider character X which folds to the three character
+ # string 'xyz'. If 2 things fold to x (X and x), 4 to y (Y, Y'
+ # (Y-prime), Y'' (Y-prime-prime), and y), and 1 thing to z (itself), 4
+ # tests will be generated:
+ # xyz
+ # XYz
+ # xY'z
+ # xY''z
+ for (my $i = 0; $i < $max_folds_to; $i++) {
+ my @this_test_to; # Assemble a single test
+
+ # For each character in the multi-char fold ...
+ for (my $j = 0; $j < $to_chars; $j++) {
+ my $this_char = substr($to, $j, 1);
+
+ # Use its corresponding inverse fold, if available.
+ if ( $i < $folds_to_count[$j]
+ && exists $inverse_folds{$this_char}{1})
+ {
+ push @this_test_to, ord $inverse_folds{$this_char}{1}[$i];
+ }
+ else { # Or else itself.
+ push @this_test_to, ord $this_char;
+ }
+ }
+
+ # Add this test to the list
+ push @test_to, [ @this_test_to ];
+ }
+
+ # Here, have assembled all the tests for the multi-char fold. Sort so
+ # lowest code points are first for consistency and aesthetics in
+ # output. We know there are at least two characters in the fold, but
+ # I haven't bothered to worry about sorting on an optional third
+ # character if the first two are identical.
+ @test_to = sort { ($a->[0] == $b->[0])
+ ? $a->[1] <=> $b->[1]
+ : $a->[0] <=> $b->[0]
+ } @test_to;
+ }
+
+
+ # This test is from n bytes to m bytes. Record that so won't try to add
+ # another test that does the same.
+ use bytes;
+ my $to_bytes = length $to;
+ foreach my $from_map (@from) {
+ $has_test_by_byte_count{length $from_map}{$to_bytes} = $to;
+ }
+ no bytes;
+
+ my $ord_smallest_from = ord shift @from;
+ if (exists $tests_ref->{$ord_smallest_from}) {
+ die "There are already tests for $ord_smallest_from"
+ };
+
+ # Add in the fold tests,
+ push @{$tests_ref->{$ord_smallest_from}}, @test_to;
+
+ # Then any remaining froms in the equivalence class.
+ push @{$tests_ref->{$ord_smallest_from}}, map { ord $_ } @from;
+}
+
+# Get the Unicode rules and construct inverse mappings from them
+
+use Unicode::UCD;
+my $file="../lib/unicore/CaseFolding.txt";
+
+# Use the Unicode data file if we are on an ASCII platform (which its data is
+# for), and it is in the modern format (starting in Unicode 3.1.0) and it is
+# available. This avoids being affected by potential bugs introduced by other
+# layers of Perl
+if ($::IS_ASCII
+ && pack("C*", split /\./, Unicode::UCD::UnicodeVersion()) ge v3.1.0
+ && open my $fh, "<", $file)
+{
+ # We process the file in reverse order because its easier to see the T
+ # entry first and then know that the next line we process is the
+ # corresponding one for non-T.
+ my @rules = <$fh>;
+ my $prev_was_turkic = 0;
+ while (defined ($_ = pop @rules)) {
+ chomp;
+
+ # Lines look like (though without the initial '#')
+ #0130; F; 0069 0307; # LATIN CAPITAL LETTER I WITH DOT ABOVE
+
+ # Get rid of comments, ignore blank or comment-only lines
+ my $line = $_ =~ s/ (?: \s* \# .* )? $ //rx;
+ next unless length $line;
+ my ($hex_from, $fold_type, @hex_folded) = split /[\s;]+/, $line;
+
+ next if $fold_type eq 'S'; # If Unicode's tables are correct, the F
+ # should be a superset of S
+ next if $fold_type eq 'I'; # Perl doesn't do old Turkish folding
+
+ my $test_type;
+ if ($fold_type eq 'T') {
+ $test_type = 0 + $use_turkic_rules;
+ $prev_was_turkic = 1;
+ }
+ elsif ($prev_was_turkic) {
+ $test_type = 0 + ! $use_turkic_rules;
+ $prev_was_turkic = 0;
+ }
+ else {
+ $test_type = 1;
+ $prev_was_turkic = 0;
+ }
+
+ my $from = hex $hex_from;
+ my @to = map { hex $_ } @hex_folded;
+ push @{$folds{$from}{$test_type}}, @to;
+
+ my $folded_str = pack ("U0U*", @to);
+ push @{$inverse_folds{$folded_str}{$test_type}}, chr $from;
+ }
+}
+else { # Here, can't use the .txt file: read the Unicode rules file and
+ # construct inverse mappings from it
+
+ skip_all "Don't know how to generate turkic rules on this platform"
+ if $use_turkic_rules;
+ my ($invlist_ref, $invmap_ref, undef, $default)
+ = Unicode::UCD::prop_invmap('Case_Folding');
+ for my $i (0 .. @$invlist_ref - 1 - 1) {
+ next if $invmap_ref->[$i] == $default;
+
+ # Make into an array if not so already, so can treat uniformly below
+ $invmap_ref->[$i] = [ $invmap_ref->[$i] ] if ! ref $invmap_ref->[$i];
+
+ # Each subsequent element of the range requires adjustment of +1 from
+ # the previous element
+ my $adjust = -1;
+ for my $j ($invlist_ref->[$i] .. $invlist_ref->[$i+1] -1) {
+ $adjust++;
+ my @to = map { $_ + $adjust } @{$invmap_ref->[$i]};
+ push @{$folds{$j}{1}}, @to;
+ my $folded_str = join "", map { chr } @to;
+ utf8::upgrade($folded_str);
+ #note (sprintf "%d: %04X: %s", __LINE__, $j, join " ",
+ # map { sprintf "%04X", $_ + $adjust } @{$invmap_ref->[$i]});
+ push @{$inverse_folds{$folded_str}{1}}, chr $j;
+ }
+ }
+}
+
+# Analyze the data and generate tests to get adequate test coverage. We sort
+# things so that smallest code points are done first.
+foreach my $to (sort { $a cmp $b } keys %inverse_folds)
+{
+TO:
+ foreach my $tests_ref (\%tests, \%neg_tests) {
+ my $test_type = ($tests_ref == \%tests) ? 1 : 0;
+
+ next unless exists $inverse_folds{$to}{$test_type};
+
+ # Within each fold, sort so that the smallest code points are done first
+ @{$inverse_folds{$to}{$test_type}} = sort { $a cmp $b } @{$inverse_folds{$to}{$test_type}};
+ my @from = @{$inverse_folds{$to}{$test_type}};
+
+ # Just add it to the tests if doing complete coverage
+ if (! $skip_apparently_redundant) {
+ add_test($tests_ref, $to, @from);
+ next TO;
+ }
+
+ my $to_chars = length $to;
+ my $to_range_type = range_type(substr($to, 0, 1));
+
+ # If this is required to be tested, do so. We check for these first, as
+ # they will take up slots of byte-to-byte combinations that we otherwise
+ # would have to have other tests to get.
+ foreach my $from_map (@from) {
+ if (exists $be_sure_to_test{$from_map}) {
+ add_test($tests_ref, $to, @from);
+ next TO;
+ }
+ }
+
+ # If the fold contains heterogeneous range types, is suspect and should be
+ # tested.
+ if ($to_chars > 1) {
+ foreach my $char (split "", $to) {
+ if (range_type($char) != $to_range_type) {
+ add_test($tests_ref, $to, @from);
+ next TO;
+ }
+ }
+ }
+
+ # If the mapping crosses range types, is suspect and should be tested
+ foreach my $from_map (@from) {
+ if (range_type($from_map) != $to_range_type) {
+ add_test($tests_ref, $to, @from);
+ next TO;
+ }
+ }
+
+ # Here, all components of the mapping are in the same range type. For
+ # single character folds, we test one case in each range type that has 2
+ # particpants, 3 particpants, etc.
+ if ($to_chars == 1) {
+ if (! exists $has_test_by_participants{scalar @from}{$to_range_type}) {
+ add_test($tests_ref, $to, @from);
+ $has_test_by_participants{scalar @from}{$to_range_type} = $to;
+ next TO;
+ }
+ }
+
+ # We also test all combinations of mappings from m to n bytes. This is
+ # because the regex optimizer cares. (Don't bother worrying about that
+ # Latin1 chars will occupy a different number of bytes under utf8, as
+ # there are plenty of other cases that catch these byte numbers.)
+ use bytes;
+ my $to_bytes = length $to;
+ foreach my $from_map (@from) {
+ if (! exists $has_test_by_byte_count{length $from_map}{$to_bytes}) {
+ add_test($tests_ref, $to, @from);
+ next TO;
+ }
+ }
+ }
+}
+
+# For each range type, test additionally a character that folds to itself
+add_test(\%tests, ":", ":");
+add_test(\%tests, chr utf8::unicode_to_native(0xF7), chr utf8::unicode_to_native(0xF7));
+add_test(\%tests, chr 0x2C7, chr 0x2C7);
+
+# To cut down on the number of tests
+my $has_tested_aa_above_latin1;
+my $has_tested_latin1_aa;
+my $has_tested_ascii_aa;
+my $has_tested_l_above_latin1;
+my $has_tested_above_latin1_l;
+my $has_tested_ascii_l;
+my $has_tested_above_latin1_d;
+my $has_tested_ascii_d;
+my $has_tested_non_latin1_d;
+my $has_tested_above_latin1_a;
+my $has_tested_ascii_a;
+my $has_tested_non_latin1_a;
+
+# For use by pairs() in generating combinations
+sub prefix {
+ my $p = shift;
+ map [ $p, $_ ], @_
+}
+
+# Returns all ordered combinations of pairs of elements from the input array.
+# It doesn't return pairs like (a, a), (b, b). Change the slice to an array
+# to do that. This was just to have fewer tests.
+sub pairs (@) {
+ #print STDERR __LINE__, ": ", join(" XXX ", map { sprintf "%04X", $_ } @_), "\n";
+ map { prefix $_[$_], @_[0..$_-1, $_+1..$#_] } 0..$#_
+}
+
+# Finally ready to do the tests
+foreach my $tests_ref (\%neg_tests, \%tests) {
+foreach my $test (sort { numerically } keys %{$tests_ref}) {
+
+ my $previous_target;
+ my $previous_pattern;
+ my @pairs = pairs(sort numerically $test, @{$tests_ref->{$test}});
+
+ # Each fold can be viewed as a closure of all the characters that
+ # participate in it. Look at each possible pairing from a closure, with the
+ # first member of the pair the target string to match against, and the
+ # second member forming the pattern. Thus each fold member gets tested as
+ # the string, and the pattern with every other member in the opposite role.
+ while (my $pair = shift @pairs) {
+ my ($target, $pattern) = @$pair;
+
+ # When testing a char that doesn't fold, we can get the same
+ # permutation twice; so skip all but the first.
+ next if $previous_target
+ && $previous_target == $target
+ && $previous_pattern == $pattern;
+ ($previous_target, $previous_pattern) = ($target, $pattern);
+
+ # Each side may be either a single char or a string. Extract each into an
+ # array (perhaps of length 1)
+ my @target, my @pattern;
+ @target = (ref $target) ? @$target : $target;
+ @pattern = (ref $pattern) ? @$pattern : $pattern;
+
+ # We are testing just folds to/from a single character. If our pairs
+ # happens to generate multi/multi, skip.
+ next if @target > 1 && @pattern > 1;
+
+ # Get in hex form.
+ my @x_target = map { sprintf "\\x{%04X}", $_ } @target;
+ my @x_pattern = map { sprintf "\\x{%04X}", $_ } @pattern;
+
+ my $target_above_latin1 = grep { $_ > 255 } @target;
+ my $pattern_above_latin1 = grep { $_ > 255 } @pattern;
+ my $target_has_ascii = grep { utf8::native_to_unicode($_) < 128 } @target;
+ my $pattern_has_ascii = grep { utf8::native_to_unicode($_) < 128 } @pattern;
+ my $target_only_ascii = ! grep { utf8::native_to_unicode($_) > 127 } @target;
+ my $pattern_only_ascii = ! grep { utf8::native_to_unicode($_) > 127 } @pattern;
+ my $target_has_latin1 = grep { $_ < 256 } @target;
+ my $target_has_upper_latin1
+ = grep { $_ < 256 && utf8::native_to_unicode($_) > 127 } @target;
+ my $pattern_has_upper_latin1
+ = grep { $_ < 256 && utf8::native_to_unicode($_) > 127 } @pattern;
+ my $pattern_has_latin1 = grep { $_ < 256 } @pattern;
+ my $is_self = @target == 1 && @pattern == 1 && $target[0] == $pattern[0];
+
+ # We don't test multi-char folding into other multi-chars. We are testing
+ # a code point that folds to or from other characters. Find the single
+ # code point for diagnostic purposes. (If both are single, choose the
+ # target string)
+ my $ord = @target == 1 ? $target[0] : $pattern[0];
+ my $progress = sprintf "%04X: \"%s\" and /%s/",
+ $test,
+ join("", @x_target),
+ join("", @x_pattern);
+ #note $progress;
+
+ # Now grind out tests, using various combinations.
+ {
+ my $charset_mod = lc $charset;
+ my $current_locale = setlocale(&POSIX::LC_CTYPE);
+ $current_locale = 'C locale' if $current_locale eq 'C';
+ $okays = 0;
+ $this_iteration = 0;
+
+ # To cut down somewhat on the enormous quantity of tests this currently
+ # runs, skip some for some of the character sets whose results aren't
+ # likely to differ from others. But run all tests on the code points
+ # that don't fold, plus one other set in each range group.
+ if (! $is_self) {
+
+ # /aa should only affect things with folds in the ASCII range. But, try
+ # it on one set in the other ranges just to make sure it doesn't break
+ # them.
+ if ($charset eq 'aa') {
+
+ # It may be that this $pair of code points to test are both
+ # non-ascii, but if either of them actually fold to ascii, that is
+ # suspect and should be tested. So for /aa, use whether their folds
+ # are ascii or not
+ my $target_has_ascii = $target_has_ascii;
+ my $pattern_has_ascii = $pattern_has_ascii;
+ if (! $target_has_ascii) {
+ foreach my $cp (@target) {
+ if (exists $folds{$cp}{1}
+ && grep { utf8::native_to_unicode($_) < 128 } @{$folds{$cp}{1}} )
+ {
+ $target_has_ascii = 1;
+ last;
+ }
+ }
+ }
+ if (! $pattern_has_ascii) {
+ foreach my $cp (@pattern) {
+ if (exists $folds{$cp}{1}
+ && grep { utf8::native_to_unicode($_) < 128 } @{$folds{$cp}}{1} )
+ {
+ $pattern_has_ascii = 1;
+ last;
+ }
+ }
+ }
+
+ if (! $target_has_ascii && ! $pattern_has_ascii) {
+ if ($target_above_latin1 || $pattern_above_latin1) {
+ next if defined $has_tested_aa_above_latin1
+ && $has_tested_aa_above_latin1 != $test;
+ $has_tested_aa_above_latin1 = $test;
+ }
+ next if defined $has_tested_latin1_aa
+ && $has_tested_latin1_aa != $test;
+ $has_tested_latin1_aa = $test;
+ }
+ elsif ($target_only_ascii && $pattern_only_ascii) {
+
+ # And, except for one set just to make sure, skip tests
+ # where both elements in the pair are ASCII. If one works for
+ # aa, the others are likely too. This skips tests where the
+ # fold is from non-ASCII to ASCII, but this part of the test
+ # is just about the ASCII components.
+ next if defined $has_tested_ascii_l
+ && $has_tested_ascii_l != $test;
+ $has_tested_ascii_l = $test;
+ }
+ }
+ elsif ($charset eq 'l') {
+
+ # For l, don't need to test beyond one set those things that are
+ # all above latin1, because unlikely to have different successes
+ # than /u. But, for the same reason as described in the /aa above,
+ # it is suspect and should be tested, if either of the folds are to
+ # latin1.
+ my $target_has_latin1 = $target_has_latin1;
+ my $pattern_has_latin1 = $pattern_has_latin1;
+ if (! $target_has_latin1) {
+ foreach my $cp (@target) {
+ if (exists $folds{$cp}{1}
+ && grep { $_ < 256 } @{$folds{$cp}{1}} )
+ {
+ $target_has_latin1 = 1;
+ last;
+ }
+ }
+ }
+ if (! $pattern_has_latin1) {
+ foreach my $cp (@pattern) {
+ if (exists $folds{$cp}{1}
+ && grep { $_ < 256 } @{$folds{$cp}{1}} )
+ {
+ $pattern_has_latin1 = 1;
+ last;
+ }
+ }
+ }
+ if (! $target_has_latin1 && ! $pattern_has_latin1) {
+ next if defined $has_tested_above_latin1_l
+ && $has_tested_above_latin1_l != $test;
+ $has_tested_above_latin1_l = $test;
+ }
+ elsif ($target_only_ascii && $pattern_only_ascii) {
+
+ # And, except for one set just to make sure, skip tests
+ # where both elements in the pair are ASCII. This is
+ # essentially the same reasoning as above for /aa.
+ next if defined $has_tested_ascii_l
+ && $has_tested_ascii_l != $test;
+ $has_tested_ascii_l = $test;
+ }
+ }
+ elsif ($charset eq 'd') {
+ # Similarly for d. Beyond one test (besides self) each, we don't
+ # test pairs that are both ascii; or both above latin1, or are
+ # combinations of ascii and above latin1.
+ if (! $target_has_upper_latin1 && ! $pattern_has_upper_latin1) {
+ if ($target_has_ascii && $pattern_has_ascii) {
+ next if defined $has_tested_ascii_d
+ && $has_tested_ascii_d != $test;
+ $has_tested_ascii_d = $test
+ }
+ elsif (! $target_has_latin1 && ! $pattern_has_latin1) {
+ next if defined $has_tested_above_latin1_d
+ && $has_tested_above_latin1_d != $test;
+ $has_tested_above_latin1_d = $test;
+ }
+ else {
+ next if defined $has_tested_non_latin1_d
+ && $has_tested_non_latin1_d != $test;
+ $has_tested_non_latin1_d = $test;
+ }
+ }
+ }
+ elsif ($charset eq 'a') {
+ # Similarly for a. This should match identically to /u, so wasn't
+ # tested at all until a bug was found that was thereby missed.
+ # As a compromise, beyond one test (besides self) each, we don't
+ # test pairs that are both ascii; or both above latin1, or are
+ # combinations of ascii and above latin1.
+ if (! $target_has_upper_latin1 && ! $pattern_has_upper_latin1) {
+ if ($target_has_ascii && $pattern_has_ascii) {
+ next if defined $has_tested_ascii_a
+ && $has_tested_ascii_a != $test;
+ $has_tested_ascii_a = $test
+ }
+ elsif (! $target_has_latin1 && ! $pattern_has_latin1) {
+ next if defined $has_tested_above_latin1_a
+ && $has_tested_above_latin1_a != $test;
+ $has_tested_above_latin1_a = $test;
+ }
+ else {
+ next if defined $has_tested_non_latin1_a
+ && $has_tested_non_latin1_a != $test;
+ $has_tested_non_latin1_a = $test;
+ }
+ }
+ }
+ }
+
+ foreach my $utf8_target (0, 1) { # Both utf8 and not, for
+ # code points < 256
+ my $upgrade_target = "";
+
+ # These must already be in utf8 because the string to match has
+ # something above latin1. So impossible to test if to not to be in
+ # utf8; and otherwise, no upgrade is needed.
+ next if $target_above_latin1 && ! $utf8_target;
+ $upgrade_target = ' utf8::upgrade($c);' if ! $target_above_latin1 && $utf8_target;
+
+ foreach my $utf8_pattern (0, 1) {
+ next if $pattern_above_latin1 && ! $utf8_pattern;
+
+ # Our testing of 'l' uses the POSIX locale, which is ASCII-only
+ my $uni_semantics = $charset ne 'l' && ( $utf8_target
+ || $charset eq 'u'
+ || $charset eq 'L'
+ || ($charset eq 'd' && $utf8_pattern)
+ || $charset =~ /a/);
+ my $upgrade_pattern = "";
+ $upgrade_pattern = ' utf8::upgrade($p);' if ! $pattern_above_latin1 && $utf8_pattern;
+
+ my $lhs = join "", @x_target;
+ my $lhs_str = eval qq{"$lhs"}; fail($@) if $@;
+ my @rhs = @x_pattern;
+ my $rhs = join "", @rhs;
+
+ # Unicode created a folding rule that partially emulates what
+ # happens in a Turkish locale, by using combining characters. The
+ # result is close enough to what really should happen, that it can
+ # pass many of the tests, but not all. So, if we have a rule that
+ # is expecting failure, it may pass instead. The code in the block
+ # below is good enough for skipping the tests, and khw tried to make
+ # it general, but should the rules be revised (unlikely at this
+ # point), this might need to be tweaked.
+ if ($tests_ref == \%neg_tests) {
+ my ($shorter_ref, $longer_ref);
+
+ # Convert the $rhs to a string, like we already did for the lhs
+ my $rhs_str = eval qq{"$rhs"}; fail($@) if $@;
+
+ # If the lengths of the two sides are equal, we don't want to do
+ # this; this is only to bypass the combining characters affecting
+ # things
+ if (length $lhs_str != length $rhs_str) {
+
+ # Find the shorter and longer of the pair
+ if (length $lhs_str < length $rhs_str) {
+ $shorter_ref = \$lhs_str;
+ $longer_ref = \$rhs_str;
+ }
+ else {
+ $shorter_ref = \$rhs_str;
+ $longer_ref = \$lhs_str;
+ }
+
+ # If the shorter string is entirely contained in the longer, we
+ # have generated a test that is likely to succeed, and the
+ # reasons it would fail have nothing to do with folding. But we
+ # are expecting it to fail, and so our test is invalid. Skip
+ # it.
+ next if index($$longer_ref, $$shorter_ref) >= 0;
+
+
+ # The above eliminates about half the failure cases. This gets
+ # the rest. If the shorter string is a single character and has
+ # a fold legal in this run to a character that is in the longer
+ # string, it is also likely to succeed under /i. So again our
+ # computed test is bogus.
+ if ( length $$shorter_ref == 1
+ && exists $folds{ord $$shorter_ref}{1})
+ {
+ my @folded_to = @{$folds{ord $$shorter_ref}{1}};
+ next if @folded_to == 1
+ && index($$longer_ref, chr $folded_to[0]) >= 0;
+ }
+ }
+ }
+
+ my $should_fail = (! $uni_semantics && $ord < 256 && ! $is_self && utf8::native_to_unicode($ord) >= 128)
+ || ($charset eq 'aa' && $target_has_ascii != $pattern_has_ascii)
+ || ($charset eq 'l' && $target_has_latin1 != $pattern_has_latin1)
+ || $tests_ref == \%neg_tests;
+
+ # Do simple tests of referencing capture buffers, named and
+ # numbered.
+ my $op = '=~';
+ $op = '!~' if $should_fail;
+
+ my $todo = 0; # No longer any todo's
+ my $eval = "my \$c = \"$lhs$rhs\"; my \$p = qr/(?$charset_mod:^($rhs)\\1\$)/i;$upgrade_target$upgrade_pattern \$c $op \$p";
+ run_test($eval, $todo, ($charset_mod eq 'l'), "");
+
+ $eval = "my \$c = \"$lhs$rhs\"; my \$p = qr/(?$charset_mod:^(?<grind>$rhs)\\k<grind>\$)/i;$upgrade_target$upgrade_pattern \$c $op \$p";
+ run_test($eval, $todo, ($charset_mod eq 'l'), "");
+
+ if ($lhs ne $rhs) {
+ $eval = "my \$c = \"$rhs$lhs\"; my \$p = qr/(?$charset_mod:^($rhs)\\1\$)/i;$upgrade_target$upgrade_pattern \$c $op \$p";
+ run_test($eval, "", ($charset_mod eq 'l'), "");
+
+ $eval = "my \$c = \"$rhs$lhs\"; my \$p = qr/(?$charset_mod:^(?<grind>$rhs)\\k<grind>\$)/i;$upgrade_target$upgrade_pattern \$c $op \$p";
+ run_test($eval, "", ($charset_mod eq 'l'), "");
+ }
+
+ # See if works on what could be a simple trie.
+ my $alternate;
+ {
+ # Keep the alternate | branch the same length as the tested one so
+ # that it's length doesn't influence things
+ my $evaled = eval "\"$rhs\""; # Convert e.g. \x{foo} into its
+ # chr equivalent
+ use bytes;
+ $alternate = 'q' x length $evaled;
+ }
+ $eval = "my \$c = \"$lhs\"; my \$p = qr/$rhs|$alternate/i$charset_mod;$upgrade_target$upgrade_pattern \$c $op \$p";
+ run_test($eval, "", ($charset_mod eq 'l'), "");
+
+ # Check that works when the folded character follows something that
+ # is quantified. This test knows the regex code internals to the
+ # extent that it knows this is a potential problem, and that there
+ # are three different types of quantifiers generated: 1) The thing
+ # being quantified matches a single character; 2) it matches more
+ # than one character, but is fixed width; 3) it can match a variable
+ # number of characters. (It doesn't know that case 3 shouldn't
+ # matter, since it doesn't do anything special for the character
+ # following the quantifier; nor that some of the different
+ # quantifiers execute the same underlying code, as these tests are
+ # quick, and this insulates these tests from changes in the
+ # implementation.)
+ for my $quantifier ('?', '??', '*', '*?', '+', '+?', '{1,2}', '{1,2}?') {
+ $eval = "my \$c = \"_$lhs\"; my \$p = qr/(?$charset_mod:.$quantifier$rhs)/i;$upgrade_target$upgrade_pattern \$c $op \$p";
+ run_test($eval, "", ($charset_mod eq 'l'), "");
+ $eval = "my \$c = \"__$lhs\"; my \$p = qr/(?$charset_mod:(?:..)$quantifier$rhs)/i;$upgrade_target$upgrade_pattern \$c $op \$p";
+ run_test($eval, "", ($charset_mod eq 'l'), "");
+ $eval = "my \$c = \"__$lhs\"; my \$p = qr/(?$charset_mod:(?:.|\\R)$quantifier$rhs)/i;$upgrade_target$upgrade_pattern \$c $op \$p";
+ run_test($eval, "", ($charset_mod eq 'l'), "");
+ }
+
+ foreach my $bracketed (0, 1) { # Put rhs in [...], or not
+ next if $bracketed && @pattern != 1; # bracketed makes these
+ # or's instead of a sequence
+ foreach my $optimize_bracketed (0, 1) {
+ next if $optimize_bracketed && ! $bracketed;
+ foreach my $inverted (0,1) {
+ next if $inverted && ! $bracketed; # inversion only valid
+ # in [^...]
+ next if $inverted && @target != 1; # [perl #89750] multi-char
+ # not valid in [^...]
+
+ # In some cases, add an extra character that doesn't fold, and
+ # looks ok in the output.
+ my $extra_char = "_";
+ foreach my $prepend ("", $extra_char) {
+ foreach my $append ("", $extra_char) {
+
+ # Assemble the rhs. Put each character in a separate
+ # bracketed if using charclasses. This creates a stress on
+ # the code to span a match across multiple elements
+ my $rhs = "";
+ foreach my $rhs_char (@rhs) {
+ $rhs .= '[' if $bracketed;
+ $rhs .= '^' if $inverted;
+ $rhs .= $rhs_char;
+
+ # Add a character to the class, so class doesn't get
+ # optimized out, unless we are testing that optimization
+ $rhs .= '_' if $optimize_bracketed;
+ $rhs .= ']' if $bracketed;
+ }
+
+ # Add one of: no capturing parens
+ # a single set
+ # a nested set
+ # Use quantifiers and extra variable width matches inside
+ # them to keep some optimizations from happening
+ foreach my $parend (0, 1, 2) {
+ my $interior = (! $parend)
+ ? $rhs
+ : ($parend == 1)
+ ? "(${rhs},?)"
+ : "((${rhs})+,?)";
+ foreach my $quantifier ("", '?', '*', '+', '{1,3}') {
+
+ # Perhaps should be TODOs, as are unimplemented, but
+ # maybe will never be implemented
+ next if @pattern != 1 && $quantifier;
+
+ # A ? or * quantifier normally causes the thing to be
+ # able to match a null string
+ my $quantifier_can_match_null = $quantifier eq '?'
+ || $quantifier eq '*';
+
+ # But since we only quantify the last character in a
+ # multiple fold, the other characters will have width,
+ # except if we are quantifying the whole rhs
+ my $can_match_null = $quantifier_can_match_null
+ && (@rhs == 1 || $parend);
+
+ foreach my $l_anchor ("", '^') { # '\A' didn't change
+ # result)
+ foreach my $r_anchor ("", '$') { # '\Z', '\z' didn't
+ # change result)
+ # The folded part can match the null string if it
+ # isn't required to have width, and there's not
+ # something on one or both sides that force it to.
+ my $both_sides = ($l_anchor && $r_anchor)
+ || ($l_anchor && $append)
+ || ($r_anchor && $prepend)
+ || ($prepend && $append);
+ my $must_match = ! $can_match_null || $both_sides;
+ # for performance, but doing this missed many failures
+ #next unless $must_match;
+ my $quantified = "(?$charset_mod:$l_anchor$prepend$interior${quantifier}$append$r_anchor)";
+ my $op;
+ if ($must_match && $should_fail) {
+ $op = 0;
+ } else {
+ $op = 1;
+ }
+ $op = ! $op if $must_match && $inverted;
+
+ if ($inverted && @target > 1) {
+ # When doing an inverted match against a
+ # multi-char target, and there is not something on
+ # the left to anchor the match, if it shouldn't
+ # succeed, skip, as what will happen (when working
+ # correctly) is that it will match the first
+ # position correctly, and then be inverted to not
+ # match; then it will go to the second position
+ # where it won't match, but get inverted to match,
+ # and hence succeeding.
+ next if ! ($l_anchor || $prepend) && ! $op;
+
+ # Can't ever match for latin1 code points non-uni
+ # semantics that have a inverted multi-char fold
+ # when there is something on both sides and the
+ # quantifier isn't such as to span the required
+ # width, which is 2 or 3.
+ $op = 0 if $ord < 255
+ && ! $uni_semantics
+ && $both_sides
+ && ( ! $quantifier || $quantifier eq '?')
+ && $parend < 2;
+
+ # Similarly can't ever match when inverting a
+ # multi-char fold for /aa and the quantifier
+ # isn't sufficient to allow it to span to both
+ # sides.
+ $op = 0 if $target_has_ascii
+ && $charset eq 'aa'
+ && $both_sides
+ && ( ! $quantifier || $quantifier eq '?')
+ && $parend < 2;
+
+ # Or for /l
+ $op = 0 if $target_has_latin1 && $charset eq 'l'
+ && $both_sides
+ && ( ! $quantifier || $quantifier eq '?')
+ && $parend < 2;
+ }
+
+
+ my $desc = "";
+ if ($charset_mod eq 'l') {
+ $desc .= 'setlocale(LC_CTYPE, "'
+ . POSIX::setlocale(&POSIX::LC_CTYPE)
+ . '"); '
+ }
+ $desc .= "my \$c = \"$prepend$lhs$append\"; "
+ . "my \$p = qr/$quantified/i;"
+ . "$upgrade_target$upgrade_pattern "
+ . "\$c " . ($op ? "=~" : "!~") . " \$p; ";
+ if ($DEBUG) {
+ $desc .= (
+ "; uni_semantics=$uni_semantics, "
+ . "should_fail=$should_fail, "
+ . "bracketed=$bracketed, "
+ . "prepend=$prepend, "
+ . "append=$append, "
+ . "parend=$parend, "
+ . "quantifier=$quantifier, "
+ . "l_anchor=$l_anchor, "
+ . "r_anchor=$r_anchor; "
+ . "pattern_above_latin1=$pattern_above_latin1; "
+ . "utf8_pattern=$utf8_pattern"
+ );
+ }
+
+ my $c = "$prepend$lhs_str$append";
+ my $p = qr/$quantified/i;
+ utf8::upgrade($c) if length($upgrade_target);
+ utf8::upgrade($p) if length($upgrade_pattern);
+ my $res = $op ? ($c =~ $p): ($c !~ $p);
+
+ if (!$res || $list_all_tests) {
+ # Failed or debug; output the result
+ $count++;
+ ok($res, "test $count - $desc");
+ } else {
+ # Just count the test as passed
+ $okays++;
+ }
+ $this_iteration++;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ unless($list_all_tests) {
+ $count++;
+ is $okays, $this_iteration, "$okays subtests ok for"
+ . " /$charset_mod"
+ . (($charset_mod eq 'l') ? " ($current_locale)" : "")
+ . ', target="' . join("", @x_target) . '",'
+ . ' pat="' . join("", @x_pattern) . '"';
+ }
+ }
+ }
+}
+}
+
+plan($count);
+
+1
diff --git a/gnu/usr.bin/perl/t/re/fold_grind_8.t b/gnu/usr.bin/perl/t/re/fold_grind_8.t
new file mode 100644
index 00000000000..b614c106381
--- /dev/null
+++ b/gnu/usr.bin/perl/t/re/fold_grind_8.t
@@ -0,0 +1,36 @@
+#!./perl
+
+# Call fold_grind with /l and a UTF-8 locale
+
+use strict;
+use warnings;
+no warnings 'once';
+
+BEGIN {
+ chdir 't' if -d 't';
+ require './test.pl';
+ require './loc_tools.pl';
+ set_up_inc('../lib');
+}
+
+skip_all "No locales" unless locales_enabled('LC_CTYPE');
+
+# Look for a utf8 locale.
+my $utf8_locale = find_utf8_ctype_locale();
+skip_all "Couldn't find a UTF-8 locale" unless defined $utf8_locale;
+
+my $current_locale = POSIX::setlocale( &POSIX::LC_CTYPE, $utf8_locale) // "";
+skip_all "Couldn't set locale to $utf8_locale"
+ unless $current_locale eq $utf8_locale;
+
+$::TEST_CHUNK = 'L';
+
+do './re/fold_grind.pl';
+print STDERR "$@\n" if $@;
+print STDERR "$!\n" if $!;
+
+1;
+
+#
+# ex: set ts=8 sts=4 sw=4 et:
+#
diff --git a/gnu/usr.bin/perl/t/re/fold_grind_T.t b/gnu/usr.bin/perl/t/re/fold_grind_T.t
new file mode 100644
index 00000000000..8b026cdfd09
--- /dev/null
+++ b/gnu/usr.bin/perl/t/re/fold_grind_T.t
@@ -0,0 +1,35 @@
+#!./perl
+
+# Call fold_grind with /l and a UTF-8 Turkic locale
+
+use strict;
+use warnings;
+no warnings 'once';
+
+BEGIN {
+ chdir 't' if -d 't';
+ require './test.pl';
+ require './loc_tools.pl';
+ set_up_inc('../lib');
+}
+
+skip_all "No locales" unless locales_enabled('LC_CTYPE');
+
+my $turkic_locale = find_utf8_turkic_locale();
+skip_all "Couldn't find a UTF-8 turkic locale" unless defined $turkic_locale;
+
+my $current_locale = POSIX::setlocale( &POSIX::LC_CTYPE, $turkic_locale) // "";
+skip_all "Couldn't set locale to $turkic_locale"
+ unless $current_locale eq $turkic_locale;
+
+$::TEST_CHUNK = 'T';
+
+do './re/fold_grind.pl';
+print STDERR "$@\n" if $@;
+print STDERR "$!\n" if $!;
+
+1;
+
+#
+# ex: set ts=8 sts=4 sw=4 et:
+#
diff --git a/gnu/usr.bin/perl/t/re/fold_grind_a.t b/gnu/usr.bin/perl/t/re/fold_grind_a.t
new file mode 100644
index 00000000000..175e9ca3b94
--- /dev/null
+++ b/gnu/usr.bin/perl/t/re/fold_grind_a.t
@@ -0,0 +1,24 @@
+#!./perl
+
+use strict;
+use warnings;
+no warnings 'once';
+
+BEGIN {
+ chdir 't' if -d 't';
+ require './test.pl';
+ require './loc_tools.pl';
+ set_up_inc('../lib');
+}
+
+$::TEST_CHUNK = 'a';
+
+do './re/fold_grind.pl';
+print STDERR "$@\n" if $@;
+print STDERR "$!\n" if $!;
+
+1;
+
+#
+# ex: set ts=8 sts=4 sw=4 et:
+#
diff --git a/gnu/usr.bin/perl/t/re/fold_grind_aa.t b/gnu/usr.bin/perl/t/re/fold_grind_aa.t
new file mode 100644
index 00000000000..40df70684cc
--- /dev/null
+++ b/gnu/usr.bin/perl/t/re/fold_grind_aa.t
@@ -0,0 +1,20 @@
+#!./perl
+
+# Call fold_grind with /aa
+
+use strict;
+use warnings;
+no warnings 'once';
+
+BEGIN {
+ chdir 't' if -d 't';
+ require './test.pl';
+ require './loc_tools.pl';
+ set_up_inc('../lib');
+}
+
+$::TEST_CHUNK = 'aa';
+
+do './re/fold_grind.pl';
+print STDERR "$@\n" if $@;
+print STDERR "$!\n" if $!;
diff --git a/gnu/usr.bin/perl/t/re/fold_grind_d.t b/gnu/usr.bin/perl/t/re/fold_grind_d.t
new file mode 100644
index 00000000000..14897fb3e6a
--- /dev/null
+++ b/gnu/usr.bin/perl/t/re/fold_grind_d.t
@@ -0,0 +1,24 @@
+#!./perl
+
+use strict;
+use warnings;
+no warnings 'once';
+
+BEGIN {
+ chdir 't' if -d 't';
+ require './test.pl';
+ require './loc_tools.pl';
+ set_up_inc('../lib');
+}
+
+$::TEST_CHUNK = 'd';
+
+do './re/fold_grind.pl';
+print STDERR "$@\n" if $@;
+print STDERR "$!\n" if $!;
+
+1;
+
+#
+# ex: set ts=8 sts=4 sw=4 et:
+#
diff --git a/gnu/usr.bin/perl/t/re/fold_grind_l.t b/gnu/usr.bin/perl/t/re/fold_grind_l.t
new file mode 100644
index 00000000000..c5cfc7b32fd
--- /dev/null
+++ b/gnu/usr.bin/perl/t/re/fold_grind_l.t
@@ -0,0 +1,41 @@
+#!./perl
+
+use strict;
+use warnings;
+no warnings 'once';
+
+BEGIN {
+ chdir 't' if -d 't';
+ require './test.pl';
+ require './loc_tools.pl';
+ set_up_inc('../lib');
+}
+
+skip_all "No locales" unless locales_enabled('LC_CTYPE');
+
+my $current_locale = POSIX::setlocale( &POSIX::LC_CTYPE, "C") // "";
+skip_all "Couldn't set locale to C" unless $current_locale eq 'C';
+
+use locale;
+
+# Some implementations don't have the 128-255 range characters all
+# mean nothing under the C locale (an example being VMS). This is
+# legal, but since we don't know what the right answers should be,
+# skip the locale tests in that situation.
+for my $i (128 .. 255) {
+ my $char = chr(utf8::unicode_to_native($i));
+ skip_all "C locale doesn't behave as expected" if uc($char) ne $char
+ || lc($char) ne $char;
+}
+
+$::TEST_CHUNK = 'l';
+
+do './re/fold_grind.pl';
+print STDERR "$@\n" if $@;
+print STDERR "$!\n" if $!;
+
+1;
+
+#
+# ex: set ts=8 sts=4 sw=4 et:
+#
diff --git a/gnu/usr.bin/perl/t/re/fold_grind_u.t b/gnu/usr.bin/perl/t/re/fold_grind_u.t
new file mode 100644
index 00000000000..fb2013ed597
--- /dev/null
+++ b/gnu/usr.bin/perl/t/re/fold_grind_u.t
@@ -0,0 +1,24 @@
+#!./perl
+
+use strict;
+use warnings;
+no warnings 'once';
+
+BEGIN {
+ chdir 't' if -d 't';
+ require './test.pl';
+ require './loc_tools.pl';
+ set_up_inc('../lib');
+}
+
+$::TEST_CHUNK = 'u';
+
+do './re/fold_grind.pl';
+print STDERR "$@\n" if $@;
+print STDERR "$!\n" if $!;
+
+1;
+
+#
+# ex: set ts=8 sts=4 sw=4 et:
+#
diff --git a/gnu/usr.bin/perl/t/re/user_prop_race_thr.t b/gnu/usr.bin/perl/t/re/user_prop_race_thr.t
new file mode 100644
index 00000000000..c240a596c71
--- /dev/null
+++ b/gnu/usr.bin/perl/t/re/user_prop_race_thr.t
@@ -0,0 +1,117 @@
+#!perl
+use strict;
+use warnings;
+
+require './test.pl';
+skip_all_without_config('useithreads');
+skip_all_if_miniperl("no dynamic loading on miniperl, no threads");
+
+plan(3);
+
+require threads;
+
+{
+ fresh_perl_is('
+ use threads;
+ use strict;
+ use warnings;
+
+ sub main::IsA {
+ use feature "state";
+
+ state $upper_char = ord "A";
+ state $lower_char = ord "a";
+
+ return sprintf "%x", $lower_char++ if shift;
+ return sprintf "%x", $upper_char++;
+ }
+
+ my @threads = map +threads->create(sub {
+ sleep 0.1;
+
+ for (1..2500) {
+ return 0 unless eval "qq(A) =~ qr/\\\p{main::IsA}/";
+ return 0 unless eval "qq(a) =~ qr/\\\p{main::IsA}/i";
+ }
+
+ return 1;
+ }), (0..1);
+ my $success = $threads[0]->join;
+ $success += $threads[1]->join;
+ print $success;',
+ 2,
+ {},
+ "Simultaneous threads worked");
+
+}
+
+{
+ fresh_perl_is('
+ use threads;
+ use strict;
+ use warnings;
+
+ sub InLongSleep {
+ use feature "state";
+
+ state $which = 0;
+
+ sleep(60) unless $which++;
+ return "0042";
+ }
+
+ sub InQuick {
+ return sprintf "%x", ord("C");
+ }
+
+ my $thread0 = threads->create(sub {
+
+ my $a = \'\p{InLongSleep}\';
+ qr/$a/;
+
+ return 1;
+ });
+ my $thread1 = threads->create(sub {
+ sleep 1;
+
+ my $c = \'\p{InQuick}\';
+ return "C" =~ /$c/;
+ });
+ print $thread1->join;
+ $thread0->detach();',
+ 1,
+ {},
+ "One thread hung on a defn doesn't impinge on other's other defns");
+}
+
+{
+ fresh_perl_like('
+ use threads;
+ use strict;
+ use warnings;
+
+ sub InLongSleep {
+ use feature "state";
+
+ state $which = 0;
+
+ sleep(25) unless $which++;
+ return "0042";
+ }
+
+ my @threads = map +threads->create(sub {
+ sleep 1;
+
+ my $a = \'\p{InLongSleep}\';
+ qr/$a/;
+
+ return 1;
+ }), (0..1);
+ $threads[1]->join;
+ $threads[0]->detach();',
+ qr/Thread \d+ terminated abnormally: Timeout waiting for another thread to define "InLongSleep" in regex/,
+ {},
+ "One thread hung on a definition doesn't delay another indefinitely");
+}
+
+1;
diff --git a/gnu/usr.bin/perl/t/uni/caller.t b/gnu/usr.bin/perl/t/uni/caller.t
index c48018c1ee5..e05f73735d3 100644
--- a/gnu/usr.bin/perl/t/uni/caller.t
+++ b/gnu/usr.bin/perl/t/uni/caller.t
@@ -5,12 +5,13 @@ BEGIN {
chdir 't' if -d 't';
require './test.pl';
set_up_inc('../lib');
- plan( tests => 18 );
}
use utf8;
use open qw( :utf8 :std );
+plan( tests => 18 );
+
package main;
{