xref: /PHP-5.6/ext/pcre/pcrelib/testdata/testinputEBC (revision ca02d9c2)
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    12\x15ABC
14
15/^A/m<any>
16    12\x15ABC
17    12\x0dABC
18    12\x0d\x15ABC
19    12\x25ABC
20
21/^A/m<anycrlf>
22    12\x15ABC
23    12\x0dABC
24    12\x0d\x15ABC
25    ** Fail
26    12\x25ABC
27
28/-- Test \h --/
29
30/^A\�/
31    A B
32    A\x41B
33
34/-- Test \H --/
35
36/^A\�/
37    AB
38    A\x42B
39    ** Fail
40    A B
41    A\x41B
42
43/-- Test \R --/
44
45/^A\�/
46    A\x15B
47    A\x0dB
48    A\x25B
49    A\x0bB
50    A\x0cB
51    ** Fail
52    A B
53
54/-- Test \v --/
55
56/^A\�/
57    A\x15B
58    A\x0dB
59    A\x25B
60    A\x0bB
61    A\x0cB
62    ** Fail
63    A B
64
65/-- Test \V --/
66
67/^A\�/
68    A B
69    ** Fail
70    A\x15B
71    A\x0dB
72    A\x25B
73    A\x0bB
74    A\x0cB
75
76/-- For repeated items, use an atomic group so that the output is the same
77for DFA matching (otherwise it may show multiple matches). --/
78
79/-- Test \h+ --/
80
81/^A(?>\�+)/
82    A B
83
84/-- Test \H+ --/
85
86/^A(?>\�+)/
87    AB
88    ** Fail
89    A B
90
91/-- Test \R+ --/
92
93/^A(?>\�+)/
94    A\x15B
95    A\x0dB
96    A\x25B
97    A\x0bB
98    A\x0cB
99    ** Fail
100    A B
101
102/-- Test \v+ --/
103
104/^A(?>\�+)/
105    A\x15B
106    A\x0dB
107    A\x25B
108    A\x0bB
109    A\x0cB
110    ** Fail
111    A B
112
113/-- Test \V+ --/
114
115/^A(?>\�+)/
116    A B
117    ** Fail
118    A\x15B
119    A\x0dB
120    A\x25B
121    A\x0bB
122    A\x0cB
123
124/-- End --/
125