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