This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Rename a variable
[perl5.git] / t / re / anyof.t
CommitLineData
1ce8be81
N
1#!./perl
2
671d6967
KW
3use strict;
4use warnings;
847612ec
KW
5use utf8;
6
7# This tests that the ANYOF nodes generated by bracketed character classes are
8# as expected. The representation of these is not guaranteed, and this test
9# may need to be updated if it changes. But it is here to make sure that no
10# unexpected changes occur. These could come from faulty generation of the
11# node, or faulty display of them (or both). Because these causes come from
12# very different parts of the regex compiler, it is unlikely that a commit
13# would change both of them, so this test will adequately serve to test both.
14
15BEGIN {
16 chdir 't' if -d 't';
847612ec 17 require './test.pl';
1ce8be81
N
18 set_up_inc('../lib','.','../ext/re');
19 require Config; import Config;
847612ec
KW
20 skip_all('no re module') unless defined &DynaLoader::boot_DynaLoader;
21}
22
23# An array is used instead of a hash, so that the tests are carried out in the
24# order given by this file. Even-numbered indices are the regexes to compile.
25# The next higher element is the expected compilation result.
26#
27# It is painful to port some of these to EBCDIC, as not only do the code point
28# numbers change (for those < 256), but the order changes, as the compiled
29# version is sorted by native code point order. On EBCDIC, \r comes before
30# \n, and 'k' before "K', for example. So, the tests where there are
31# differences are skipped on EBCDIC. They are all at the beginning of the
32# array, and a special marker entry is used to delmit the boundary between
33# skipped and not skipped.
87cafc45
KW
34#
35# NOTE: If the pattern contains (?8) it will be upgraded to UTF-8 after
36# stripping that
847612ec 37
542d7e4a
KW
38# 2**32-1 or 2**64-1
39my $highest_cp_string = "F" x (($Config{uvsize} < 8) ? 8 : 16);
40
41my $next_highest_cp_string = $highest_cp_string =~ s/ F $ /E/xr;
42
43my $highest_cp = "\\x{$highest_cp_string}";
44my $next_highest_cp = "\\x{$next_highest_cp_string}";
45
46sub get_compiled ($) {
47 # Convert platform-independent values to what is suitable for the
48 # platform
49
50 my $pattern = shift;
51
52 $pattern =~ s/\{INFTY\}/$highest_cp/g;
53 $pattern =~ s/\{INFTY_minus_1\}/$next_highest_cp/g;
54 my $use_utf8 = ($pattern =~ s/\Q(?8)//);
55
56 $pattern = "my \$a = '$pattern';";
57 $pattern .= "utf8::upgrade(\$a);" if $use_utf8;
58 $pattern .= "qr/\$a/";
59 my $actual_pattern = "use re qw(Debug COMPILE); $pattern";
60
61 my $result = fresh_perl($actual_pattern);
62 if ($? != 0) { # Re-run so as to display STDERR.
63 fail($pattern);
64 fresh_perl($actual_pattern, { stderr => 0, verbose => 1 });
65 return;
66 }
67
68 # The Debug output will come back as a bunch of lines. We are
69 # interested only in the line after /Final program/
70 my @lines = split /\n/, $result;
71 while (defined ($_ = shift @lines)) {
72 last if /Final program/;
73 }
74
75 $_ = shift @lines;
76
77 s/ \s* \( \d+ \) \s* //x; # Get rid of the node branch
78 s/ ^ \s* \d+ : \s* //x; # ... And the node number
79
80 # Use platform-independent values
81 s/$highest_cp_string/INFTY/g;
82 s/$next_highest_cp_string/INFTY_minus_1/g;
83
84 return $_;
85}
86
847612ec 87my @tests = (
2813d4ad 88 '[[{]' => 'ANYOFM[\[\{]',
02517e3f 89 '[^\S ]' => 'ANYOFD[\t\n\x0B\f\r{utf8}\x85\xA0][1680 2000-200A 2028-2029 202F 205F 3000]',
6b503dfb
KW
90 '[^\n\r]' => 'ANYOF[^\n\r][0100-INFTY]',
91 '[^\/\|,\$\%%\@\ \%"\<\>\:\#\&\*\{\}\[\]\(\)]' => 'ANYOF[^ "#$%&()*,/:<>@\[\]\{|\}][0100-INFTY]',
a3049f27 92 '[^[:^print:][:^ascii:]]' => 'POSIXA[:print:]',
847612ec 93 '[ [:blank:]]' => 'ANYOFD[\t {utf8}\xA0][1680 2000-200A 202F 205F 3000]',
6b503dfb
KW
94 '[_[:^blank:]]' => 'ANYOFD[^\t {utf8}\xA0][0100-167F 1681-1FFF 200B-202E 2030-205E 2060-2FFF 3001-INFTY]',
95 '[\xA0[:^blank:]]' => 'ANYOF[^\t ][0100-167F 1681-1FFF 200B-202E 2030-205E 2060-2FFF 3001-INFTY]',
d555b9dd 96 '[ [:blank:]]' => 'ANYOFD[\t {utf8}\xA0][1680 2000-200A 202F 205F 3000]',
6b503dfb 97 '[_[:^blank:]]' => 'ANYOFD[^\t {utf8}\xA0][0100-167F 1681-1FFF 200B-202E 2030-205E 2060-2FFF 3001-INFTY]',
6b503dfb 98 '(?d:[_[:^blank:]])' => 'ANYOFD[^\t {utf8}\xA0][0100-167F 1681-1FFF 200B-202E 2030-205E 2060-2FFF 3001-INFTY]',
58f79e73 99 '[\x{07}-\x{0B}]' => 'ANYOF[\a\b\t\n\x0B]',
847612ec
KW
100 '(?il:[\x{212A}])' => 'ANYOFL{i}[{utf8 locale}Kk][212A]',
101 '(?il:(?[\x{212A}]))' => 'ANYOFL{utf8-locale-reqd}[Kk][212A]',
102
103 'ebcdic_ok_below_this_marker',
104
105 '(?l:[\x{212A}])' => 'ANYOFL[212A]',
d156f5cb
KW
106 '(?l:[\s\x{212A}])' => 'ANYOFPOSIXL[\s][1680 2000-200A 2028-2029 202F 205F 212A 3000]',
107 '(?l:[^\S\x{202F}])' => 'ANYOFPOSIXL[^\\S][1680 2000-200A 2028-2029 205F 3000]',
3db0bccc 108 '(?i:[^:])' => 'NANYOFM[:]',
ecfe5375 109 '[\p{Any}]' => 'ANYOF[\x00-\xFF][0100-10FFFF]',
ff9145b9 110
ecfe5375
KW
111 '[\p{IsMyRuntimeProperty}]' => 'ANYOF[+utf8::IsMyRuntimeProperty]',
112 '[^\p{IsMyRuntimeProperty}]' => 'ANYOF[^{+utf8::IsMyRuntimeProperty}]',
113 '[a\p{IsMyRuntimeProperty}]' => 'ANYOF[a][+utf8::IsMyRuntimeProperty]',
114 '[^a\p{IsMyRuntimeProperty}]' => 'ANYOF[^a{+utf8::IsMyRuntimeProperty}]',
115 '[^a\x{100}\p{IsMyRuntimeProperty}]' => 'ANYOF[^a{+utf8::IsMyRuntimeProperty}0100]',
ff9145b9 116
6b503dfb
KW
117 '[\x{00}-{INFTY_minus_1}]' => 'ANYOF[\x00-\xFF][0100-INFTY_minus_1]',
118 '[\x{00}-{INFTY}]' => 'SANY',
6b503dfb 119 '[\x{101}-{INFTY}]' => 'ANYOF[0101-INFTY]',
ff9145b9
KW
120 '[\x{101}-{INFTY_minus_1}]' => 'ANYOF[0101-INFTY_minus_1]',
121 '[\x{102}\x{104}]' => 'ANYOF[0102 0104]',
6b503dfb 122 '[\x{102}-\x{104}{INFTY}]' => 'ANYOF[0102-0104 INFTY-INFTY]',
ff9145b9
KW
123 '[\x{102}-\x{104}{INFTY_minus_1}]' => 'ANYOF[0102-0104 INFTY_minus_1]',
124 '[\x{102}-\x{104}\x{101}]' => 'ANYOF[0101-0104]',
6b503dfb 125 '[\x{102}-\x{104}\x{101}-{INFTY}]' => 'ANYOF[0101-INFTY]',
ff9145b9
KW
126 '[\x{102}-\x{104}\x{101}-{INFTY_minus_1}]' => 'ANYOF[0101-INFTY_minus_1]',
127 '[\x{102}-\x{104}\x{102}]' => 'ANYOF[0102-0104]',
6b503dfb 128 '[\x{102}-\x{104}\x{102}-{INFTY}]' => 'ANYOF[0102-INFTY]',
ff9145b9
KW
129 '[\x{102}-\x{104}\x{102}-{INFTY_minus_1}]' => 'ANYOF[0102-INFTY_minus_1]',
130 '[\x{102}-\x{104}\x{103}]' => 'ANYOF[0102-0104]',
6b503dfb 131 '[\x{102}-\x{104}\x{103}-{INFTY}]' => 'ANYOF[0102-INFTY]',
ff9145b9
KW
132 '[\x{102}-\x{104}\x{103}-{INFTY_minus_1}]' => 'ANYOF[0102-INFTY_minus_1]',
133 '[\x{102}-\x{104}\x{104}]' => 'ANYOF[0102-0104]',
6b503dfb 134 '[\x{102}-\x{104}\x{104}-{INFTY}]' => 'ANYOF[0102-INFTY]',
ff9145b9
KW
135 '[\x{102}-\x{104}\x{104}-{INFTY_minus_1}]' => 'ANYOF[0102-INFTY_minus_1]',
136 '[\x{102}-\x{104}\x{105}]' => 'ANYOF[0102-0105]',
6b503dfb 137 '[\x{102}-\x{104}\x{105}-{INFTY}]' => 'ANYOF[0102-INFTY]',
ff9145b9
KW
138 '[\x{102}-\x{104}\x{105}-{INFTY_minus_1}]' => 'ANYOF[0102-INFTY_minus_1]',
139 '[\x{102}-\x{104}\x{106}]' => 'ANYOF[0102-0104 0106]',
6b503dfb 140 '[\x{102}-\x{104}\x{106}-{INFTY}]' => 'ANYOF[0102-0104 0106-INFTY]',
ff9145b9 141 '[\x{102}-\x{104}\x{106}-{INFTY_minus_1}]' => 'ANYOF[0102-0104 0106-INFTY_minus_1]',
6b503dfb 142 '[\x{102}-\x{104}\x{108}-\x{10A}{INFTY}]' => 'ANYOF[0102-0104 0108-010A INFTY-INFTY]',
ff9145b9
KW
143 '[\x{102}-\x{104}\x{108}-\x{10A}{INFTY_minus_1}]' => 'ANYOF[0102-0104 0108-010A INFTY_minus_1]',
144 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}]' => 'ANYOF[0101-0104 0108-010A]',
145 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{INFTY}]' => 'ANYOF[0101-INFTY]',
146 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{INFTY_minus_1}]' => 'ANYOF[0101-INFTY_minus_1]',
a7560fcd
KW
147 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{102}]' => 'ANYOF[0101-0104 0108-010A]',
148 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{103}]' => 'ANYOF[0101-0104 0108-010A]',
149 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{104}]' => 'ANYOF[0101-0104 0108-010A]',
150 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{105}]' => 'ANYOF[0101-0105 0108-010A]',
151 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{106}]' => 'ANYOF[0101-0106 0108-010A]',
152 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{107}]' => 'ANYOF[0101-010A]',
153 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{108}]' => 'ANYOF[0101-010A]',
154 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{109}]' => 'ANYOF[0101-010A]',
155 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10A}]' => 'ANYOF[0101-010A]',
156 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10B}]' => 'ANYOF[0101-010B]',
ff9145b9
KW
157 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}]' => 'ANYOF[0102-0104 0108-010A]',
158 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{INFTY}]' => 'ANYOF[0102-INFTY]',
159 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{INFTY_minus_1}]' => 'ANYOF[0102-INFTY_minus_1]',
a7560fcd
KW
160 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{102}]' => 'ANYOF[0102-0104 0108-010A]',
161 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{103}]' => 'ANYOF[0102-0104 0108-010A]',
162 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{104}]' => 'ANYOF[0102-0104 0108-010A]',
163 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{105}]' => 'ANYOF[0102-0105 0108-010A]',
164 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{106}]' => 'ANYOF[0102-0106 0108-010A]',
165 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{107}]' => 'ANYOF[0102-010A]',
166 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{108}]' => 'ANYOF[0102-010A]',
167 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{109}]' => 'ANYOF[0102-010A]',
168 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10A}]' => 'ANYOF[0102-010A]',
169 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10B}]' => 'ANYOF[0102-010B]',
170 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10C}]' => 'ANYOF[0102-010C]',
a7560fcd 171 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}]' => 'ANYOF[0102-0104 0108-010A]',
ff9145b9
KW
172 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{INFTY}]' => 'ANYOF[0102-INFTY]',
173 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{INFTY_minus_1}]' => 'ANYOF[0102-INFTY_minus_1]',
a7560fcd
KW
174 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{104}]' => 'ANYOF[0102-0104 0108-010A]',
175 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{105}]' => 'ANYOF[0102-0105 0108-010A]',
176 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{106}]' => 'ANYOF[0102-0106 0108-010A]',
177 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{107}]' => 'ANYOF[0102-010A]',
178 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{108}]' => 'ANYOF[0102-010A]',
179 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{109}]' => 'ANYOF[0102-010A]',
180 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10A}]' => 'ANYOF[0102-010A]',
181 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10B}]' => 'ANYOF[0102-010B]',
182 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10C}]' => 'ANYOF[0102-010C]',
a7560fcd 183 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}]' => 'ANYOF[0102-0104 0108-010A]',
ff9145b9
KW
184 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{INFTY}]' => 'ANYOF[0102-INFTY]',
185 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{INFTY_minus_1}]' => 'ANYOF[0102-INFTY_minus_1]',
a7560fcd
KW
186 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{105}]' => 'ANYOF[0102-0105 0108-010A]',
187 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{106}]' => 'ANYOF[0102-0106 0108-010A]',
188 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{107}]' => 'ANYOF[0102-010A]',
189 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{108}]' => 'ANYOF[0102-010A]',
190 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{109}]' => 'ANYOF[0102-010A]',
191 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10A}]' => 'ANYOF[0102-010A]',
192 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10B}]' => 'ANYOF[0102-010B]',
193 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10C}]' => 'ANYOF[0102-010C]',
a7560fcd 194 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}]' => 'ANYOF[0102-0105 0108-010A]',
ff9145b9
KW
195 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{INFTY}]' => 'ANYOF[0102-INFTY]',
196 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{INFTY_minus_1}]' => 'ANYOF[0102-INFTY_minus_1]',
a7560fcd
KW
197 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{106}]' => 'ANYOF[0102-0106 0108-010A]',
198 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{107}]' => 'ANYOF[0102-010A]',
199 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{108}]' => 'ANYOF[0102-010A]',
200 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{109}]' => 'ANYOF[0102-010A]',
201 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10A}]' => 'ANYOF[0102-010A]',
202 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10B}]' => 'ANYOF[0102-010B]',
203 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10C}]' => 'ANYOF[0102-010C]',
a7560fcd 204 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}]' => 'ANYOF[0102-0104 0106 0108-010A]',
ff9145b9
KW
205 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{INFTY}]' => 'ANYOF[0102-0104 0106-INFTY]',
206 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{INFTY_minus_1}]' => 'ANYOF[0102-0104 0106-INFTY_minus_1]',
a7560fcd
KW
207 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{107}]' => 'ANYOF[0102-0104 0106-010A]',
208 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{108}]' => 'ANYOF[0102-0104 0106-010A]',
209 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{109}]' => 'ANYOF[0102-0104 0106-010A]',
210 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10A}]' => 'ANYOF[0102-0104 0106-010A]',
211 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10B}]' => 'ANYOF[0102-0104 0106-010B]',
212 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10C}]' => 'ANYOF[0102-0104 0106-010C]',
ff9145b9
KW
213 '[\x{102}-\x{104}\x{108}-\x{10A}\x{107}]' => 'ANYOF[0102-0104 0107-010A]',
214 '[\x{102}-\x{104}\x{108}-\x{10A}\x{108}]' => 'ANYOF[0102-0104 0108-010A]',
215 '[\x{102}-\x{104}\x{108}-\x{10A}\x{109}]' => 'ANYOF[0102-0104 0108-010A]',
216 '[\x{102}-\x{104}\x{108}-\x{10A}\x{10A}]' => 'ANYOF[0102-0104 0108-010A]',
217 '[\x{102}-\x{104}\x{108}-\x{10A}\x{10B}]' => 'ANYOF[0102-0104 0108-010B]',
218 '[\x{103}\x{102}]' => 'ANYOF[0102-0103]',
219 '[\x{104}\x{102}]' => 'ANYOF[0102 0104]',
220 '[\x{104}\x{102}\x{103}]' => 'ANYOF[0102-0104]',
221 '[\x{106}-{INFTY}\x{104}]' => 'ANYOF[0104 0106-INFTY]',
222 '[\x{106}-{INFTY}\x{104}-{INFTY}]' => 'ANYOF[0104-INFTY]',
223 '[\x{106}-{INFTY}\x{104}-{INFTY_minus_1}]' => 'ANYOF[0104-INFTY]',
224 '[\x{106}-{INFTY}\x{104}-\x{105}]' => 'ANYOF[0104-INFTY]',
225 '[\x{106}-{INFTY}\x{104}-\x{106}]' => 'ANYOF[0104-INFTY]',
226 '[\x{106}-{INFTY}\x{104}-\x{107}]' => 'ANYOF[0104-INFTY]',
227 '[\x{106}-{INFTY}\x{105}]' => 'ANYOF[0105-INFTY]',
228 '[\x{106}-{INFTY}\x{105}-{INFTY}]' => 'ANYOF[0105-INFTY]',
229 '[\x{106}-{INFTY}\x{105}-{INFTY_minus_1}]' => 'ANYOF[0105-INFTY]',
230 '[\x{106}-{INFTY}\x{105}-\x{106}]' => 'ANYOF[0105-INFTY]',
231 '[\x{106}-{INFTY}\x{105}-\x{107}]' => 'ANYOF[0105-INFTY]',
232 '[\x{106}-{INFTY}\x{106}]' => 'ANYOF[0106-INFTY]',
233 '[\x{106}-{INFTY}\x{106}-{INFTY}]' => 'ANYOF[0106-INFTY]',
234 '[\x{106}-{INFTY}\x{106}-{INFTY_minus_1}]' => 'ANYOF[0106-INFTY]',
235 '[\x{106}-{INFTY}\x{106}-\x{107}]' => 'ANYOF[0106-INFTY]',
236 '[\x{106}-{INFTY}\x{107}]' => 'ANYOF[0106-INFTY]',
237 '[\x{106}-{INFTY}\x{107}-{INFTY}]' => 'ANYOF[0106-INFTY]',
238 '[\x{106}-{INFTY}\x{107}-{INFTY_minus_1}]' => 'ANYOF[0106-INFTY]',
239 '[\x{106}-{INFTY}\x{107}-\x{107}]' => 'ANYOF[0106-INFTY]',
6b503dfb 240 '[\x{10C}-{INFTY}{INFTY}]' => 'ANYOF[010C-INFTY]',
ff9145b9 241 '[\x{10C}-{INFTY}{INFTY_minus_1}]' => 'ANYOF[010C-INFTY]',
6b503dfb
KW
242 '[\x{10C}-{INFTY}\x{00}-{INFTY_minus_1}]' => 'SANY',
243 '[\x{10C}-{INFTY}\x{00}-{INFTY}]' => 'SANY',
6b503dfb 244 '[\x{10C}-{INFTY}\x{101}-{INFTY}]' => 'ANYOF[0101-INFTY]',
ff9145b9
KW
245 '[\x{10C}-{INFTY}\x{101}-{INFTY_minus_1}]' => 'ANYOF[0101-INFTY]',
246 '[\x{10C}-{INFTY}\x{102}\x{104}]' => 'ANYOF[0102 0104 010C-INFTY]',
6b503dfb 247 '[\x{10C}-{INFTY}\x{102}-\x{104}{INFTY}]' => 'ANYOF[0102-0104 010C-INFTY]',
ff9145b9
KW
248 '[\x{10C}-{INFTY}\x{102}-\x{104}{INFTY_minus_1}]' => 'ANYOF[0102-0104 010C-INFTY]',
249 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{100}]' => 'ANYOF[0100 0102-0104 010C-INFTY]',
250 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{101}]' => 'ANYOF[0101-0104 010C-INFTY]',
6b503dfb 251 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{101}-{INFTY}]' => 'ANYOF[0101-INFTY]',
ff9145b9
KW
252 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{101}-{INFTY_minus_1}]' => 'ANYOF[0101-INFTY]',
253 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{102}]' => 'ANYOF[0102-0104 010C-INFTY]',
6b503dfb 254 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{102}-{INFTY}]' => 'ANYOF[0102-INFTY]',
ff9145b9
KW
255 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{102}-{INFTY_minus_1}]' => 'ANYOF[0102-INFTY]',
256 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{103}]' => 'ANYOF[0102-0104 010C-INFTY]',
6b503dfb 257 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{103}-{INFTY}]' => 'ANYOF[0102-INFTY]',
ff9145b9
KW
258 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{103}-{INFTY_minus_1}]' => 'ANYOF[0102-INFTY]',
259 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{104}]' => 'ANYOF[0102-0104 010C-INFTY]',
6b503dfb 260 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{104}-{INFTY}]' => 'ANYOF[0102-INFTY]',
ff9145b9
KW
261 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{104}-{INFTY_minus_1}]' => 'ANYOF[0102-INFTY]',
262 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{105}]' => 'ANYOF[0102-0105 010C-INFTY]',
6b503dfb 263 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{105}-{INFTY}]' => 'ANYOF[0102-INFTY]',
ff9145b9
KW
264 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{105}-{INFTY_minus_1}]' => 'ANYOF[0102-INFTY]',
265 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{106}]' => 'ANYOF[0102-0104 0106 010C-INFTY]',
6b503dfb 266 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{106}-{INFTY}]' => 'ANYOF[0102-0104 0106-INFTY]',
ff9145b9 267 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{106}-{INFTY_minus_1}]' => 'ANYOF[0102-0104 0106-INFTY]',
6b503dfb 268 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}{INFTY}]' => 'ANYOF[0102-0104 0108-010A 010C-INFTY]',
ff9145b9
KW
269 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}{INFTY_minus_1}]' => 'ANYOF[0102-0104 0108-010A 010C-INFTY]',
270 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}]' => 'ANYOF[0101-0104 0108-010A 010C-INFTY]',
271 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{INFTY}]' => 'ANYOF[0101-INFTY]',
272 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{INFTY_minus_1}]' => 'ANYOF[0101-INFTY]',
6b503dfb
KW
273 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{102}]' => 'ANYOF[0101-0104 0108-010A 010C-INFTY]',
274 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{103}]' => 'ANYOF[0101-0104 0108-010A 010C-INFTY]',
275 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{104}]' => 'ANYOF[0101-0104 0108-010A 010C-INFTY]',
276 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{105}]' => 'ANYOF[0101-0105 0108-010A 010C-INFTY]',
277 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{106}]' => 'ANYOF[0101-0106 0108-010A 010C-INFTY]',
278 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{107}]' => 'ANYOF[0101-010A 010C-INFTY]',
279 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{108}]' => 'ANYOF[0101-010A 010C-INFTY]',
280 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{109}]' => 'ANYOF[0101-010A 010C-INFTY]',
281 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10A}]' => 'ANYOF[0101-010A 010C-INFTY]',
282 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10B}]' => 'ANYOF[0101-INFTY]',
ff9145b9
KW
283 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}]' => 'ANYOF[0102-0104 0108-010A 010C-INFTY]',
284 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{INFTY}]' => 'ANYOF[0102-INFTY]',
285 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{INFTY_minus_1}]' => 'ANYOF[0102-INFTY]',
6b503dfb
KW
286 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{102}]' => 'ANYOF[0102-0104 0108-010A 010C-INFTY]',
287 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{103}]' => 'ANYOF[0102-0104 0108-010A 010C-INFTY]',
288 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{104}]' => 'ANYOF[0102-0104 0108-010A 010C-INFTY]',
289 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{105}]' => 'ANYOF[0102-0105 0108-010A 010C-INFTY]',
290 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{106}]' => 'ANYOF[0102-0106 0108-010A 010C-INFTY]',
291 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{107}]' => 'ANYOF[0102-010A 010C-INFTY]',
292 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{108}]' => 'ANYOF[0102-010A 010C-INFTY]',
293 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{109}]' => 'ANYOF[0102-010A 010C-INFTY]',
294 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10A}]' => 'ANYOF[0102-010A 010C-INFTY]',
295 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10B}]' => 'ANYOF[0102-INFTY]',
296 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10C}]' => 'ANYOF[0102-INFTY]',
6b503dfb 297 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}]' => 'ANYOF[0102-0104 0108-010A 010C-INFTY]',
ff9145b9
KW
298 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{INFTY}]' => 'ANYOF[0102-INFTY]',
299 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{INFTY_minus_1}]' => 'ANYOF[0102-INFTY]',
6b503dfb
KW
300 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{104}]' => 'ANYOF[0102-0104 0108-010A 010C-INFTY]',
301 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{105}]' => 'ANYOF[0102-0105 0108-010A 010C-INFTY]',
302 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{106}]' => 'ANYOF[0102-0106 0108-010A 010C-INFTY]',
303 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{107}]' => 'ANYOF[0102-010A 010C-INFTY]',
304 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{108}]' => 'ANYOF[0102-010A 010C-INFTY]',
305 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{109}]' => 'ANYOF[0102-010A 010C-INFTY]',
306 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10A}]' => 'ANYOF[0102-010A 010C-INFTY]',
307 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10B}]' => 'ANYOF[0102-INFTY]',
308 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10C}]' => 'ANYOF[0102-INFTY]',
6b503dfb 309 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}]' => 'ANYOF[0102-0104 0108-010A 010C-INFTY]',
ff9145b9
KW
310 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{INFTY}]' => 'ANYOF[0102-INFTY]',
311 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{INFTY_minus_1}]' => 'ANYOF[0102-INFTY]',
6b503dfb
KW
312 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{105}]' => 'ANYOF[0102-0105 0108-010A 010C-INFTY]',
313 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{106}]' => 'ANYOF[0102-0106 0108-010A 010C-INFTY]',
314 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{107}]' => 'ANYOF[0102-010A 010C-INFTY]',
315 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{108}]' => 'ANYOF[0102-010A 010C-INFTY]',
316 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{109}]' => 'ANYOF[0102-010A 010C-INFTY]',
317 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10A}]' => 'ANYOF[0102-010A 010C-INFTY]',
318 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10B}]' => 'ANYOF[0102-INFTY]',
319 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10C}]' => 'ANYOF[0102-INFTY]',
6b503dfb 320 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}]' => 'ANYOF[0102-0105 0108-010A 010C-INFTY]',
ff9145b9
KW
321 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{INFTY}]' => 'ANYOF[0102-INFTY]',
322 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{INFTY_minus_1}]' => 'ANYOF[0102-INFTY]',
6b503dfb
KW
323 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{106}]' => 'ANYOF[0102-0106 0108-010A 010C-INFTY]',
324 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{107}]' => 'ANYOF[0102-010A 010C-INFTY]',
325 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{108}]' => 'ANYOF[0102-010A 010C-INFTY]',
326 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{109}]' => 'ANYOF[0102-010A 010C-INFTY]',
327 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10A}]' => 'ANYOF[0102-010A 010C-INFTY]',
328 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10B}]' => 'ANYOF[0102-INFTY]',
329 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10C}]' => 'ANYOF[0102-INFTY]',
6b503dfb 330 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}]' => 'ANYOF[0102-0104 0106 0108-010A 010C-INFTY]',
ff9145b9
KW
331 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{INFTY}]' => 'ANYOF[0102-0104 0106-INFTY]',
332 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{INFTY_minus_1}]' => 'ANYOF[0102-0104 0106-INFTY]',
6b503dfb
KW
333 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{107}]' => 'ANYOF[0102-0104 0106-010A 010C-INFTY]',
334 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{108}]' => 'ANYOF[0102-0104 0106-010A 010C-INFTY]',
335 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{109}]' => 'ANYOF[0102-0104 0106-010A 010C-INFTY]',
336 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10A}]' => 'ANYOF[0102-0104 0106-010A 010C-INFTY]',
337 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10B}]' => 'ANYOF[0102-0104 0106-INFTY]',
338 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10C}]' => 'ANYOF[0102-0104 0106-INFTY]',
ff9145b9
KW
339 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{107}]' => 'ANYOF[0102-0104 0107-010A 010C-INFTY]',
340 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{108}]' => 'ANYOF[0102-0104 0108-010A 010C-INFTY]',
341 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{109}]' => 'ANYOF[0102-0104 0108-010A 010C-INFTY]',
342 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{10A}]' => 'ANYOF[0102-0104 0108-010A 010C-INFTY]',
343 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{10B}]' => 'ANYOF[0102-0104 0108-INFTY]',
344 '[\x{10C}-{INFTY}\x{103}\x{102}]' => 'ANYOF[0102-0103 010C-INFTY]',
345 '[\x{10C}-{INFTY}\x{104}\x{102}]' => 'ANYOF[0102 0104 010C-INFTY]',
346 '[\x{10C}-{INFTY}\x{104}\x{102}\x{103}]' => 'ANYOF[0102-0104 010C-INFTY]',
347 '[{INFTY_minus_1}]' => 'ANYOF[INFTY_minus_1]',
348 '[{INFTY}]' => 'ANYOF[INFTY-INFTY]',
847612ec
KW
349);
350
847612ec
KW
351plan(scalar (@tests - 1) / 2); # -1 because of the marker.
352
353my $skip_ebcdic = $::IS_EBCDIC;
354while (defined (my $test = shift @tests)) {
355
356 if ($test eq 'ebcdic_ok_below_this_marker') {
357 $skip_ebcdic = 0;
358 next;
359 }
360
361 my $expected = shift @tests;
362
363 SKIP: {
364 skip("test not ported to EBCDIC", 1) if $skip_ebcdic;
365
366 my $display_expected = $expected
6b503dfb 367 =~ s/ INFTY_minus_1 /$next_highest_cp/xgr;
847612ec 368
542d7e4a
KW
369 my $result = get_compiled($test);
370 is($result, $expected,
847612ec 371 "Verify compilation of $test displays as $display_expected");
847612ec
KW
372 }
373}