1/-- This is a specialized test for checking, when PCRE is compiled with the
2EBCDIC option but in an ASCII environment, that newline and white space
3functionality is working. It catches cases where explicit values such as 0x0a
4have been used instead of names like CHAR_LF. Needless to say, it is not a
5genuine EBCDIC test! In patterns, alphabetic characters that follow a backslash
6must be in EBCDIC code. In data, newlines and other spacing characters must be
7in EBCDIC, but can be specified as escapes. --/
8
9/-- Test default newline and variations --/
10
11/^A/m
12    ABC
13 0: A
14    12\x15ABC
15 0: A
16
17/^A/m<any>
18    12\x15ABC
19 0: A
20    12\x0dABC
21 0: A
22    12\x0d\x15ABC
23 0: A
24    12\x25ABC
25 0: A
26
27/^A/m<anycrlf>
28    12\x15ABC
29 0: A
30    12\x0dABC
31 0: A
32    12\x0d\x15ABC
33 0: A
34    ** Fail
35No match
36    12\x25ABC
37No match
38
39/-- Test \h --/
40
41/^A\�/
42    A B
43 0: A\x20
44
45/-- Test \H --/
46
47/^A\�/
48    AB
49 0: AB
50    ** Fail
51No match
52    A B
53No match
54
55/-- Test \R --/
56
57/^A\�/
58    A\x15B
59 0: A\x15
60    A\x0dB
61 0: A\x0d
62    A\x25B
63 0: A\x25
64    A\x0bB
65 0: A\x0b
66    A\x0cB
67 0: A\x0c
68    ** Fail
69No match
70    A B
71No match
72
73/-- Test \v --/
74
75/^A\�/
76    A\x15B
77 0: A\x15
78    A\x0dB
79 0: A\x0d
80    A\x25B
81 0: A\x25
82    A\x0bB
83 0: A\x0b
84    A\x0cB
85 0: A\x0c
86    ** Fail
87No match
88    A B
89No match
90
91/-- Test \V --/
92
93/^A\�/
94    A B
95 0: A\x20
96    ** Fail
97No match
98    A\x15B
99No match
100    A\x0dB
101No match
102    A\x25B
103No match
104    A\x0bB
105No match
106    A\x0cB
107No match
108
109/-- For repeated items, use an atomic group so that the output is the same
110for DFA matching (otherwise it may show multiple matches). --/
111
112/-- Test \h+ --/
113
114/^A(?>\�+)/
115    A B
116 0: A\x20
117
118/-- Test \H+ --/
119
120/^A(?>\�+)/
121    AB
122 0: AB
123    ** Fail
124No match
125    A B
126No match
127
128/-- Test \R+ --/
129
130/^A(?>\�+)/
131    A\x15B
132 0: A\x15
133    A\x0dB
134 0: A\x0d
135    A\x25B
136 0: A\x25
137    A\x0bB
138 0: A\x0b
139    A\x0cB
140 0: A\x0c
141    ** Fail
142No match
143    A B
144No match
145
146/-- Test \v+ --/
147
148/^A(?>\�+)/
149    A\x15B
150 0: A\x15
151    A\x0dB
152 0: A\x0d
153    A\x25B
154 0: A\x25
155    A\x0bB
156 0: A\x0b
157    A\x0cB
158 0: A\x0c
159    ** Fail
160No match
161    A B
162No match
163
164/-- Test \V+ --/
165
166/^A(?>\�+)/
167    A B
168 0: A\x20B
169    ** Fail
170No match
171    A\x15B
172No match
173    A\x0dB
174No match
175    A\x25B
176No match
177    A\x0bB
178No match
179    A\x0cB
180No match
181
182/-- End --/
183