File: testinput28

package info (click to toggle)
pcre2 10.47-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 14,256 kB
  • sloc: ansic: 108,003; sh: 6,686; makefile: 826
file content (153 lines) | stat: -rw-r--r-- 2,259 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# This tests the EBCDIC support in PCRE2. It catches cases where explicit values
# such as 0x0a have been used instead of names like CHAR_LF.
#
# This test file however is checked in to the repository encoded as ISO-8859-1,
# using a reversible mapping from EBCDIC. This lets us easily author test cases.
# However, they will only be run against a genuine EBCDIC when the input and
# output files are converted to EBCDIC.
#
# There is also a special mode, on ASCII systems, where pcre2test takes ASCII
# input (actually, ISO-8859-1), and then does the transcoding internally before
# calling the genuinely-EBCDIC version of PCRE2.

# Test default newline and variations

/^A/m
    ABC
    12\nABC

/^A/m,newline=any
    12\nABC
    12\rABC
    12\r\nABC
    12\x85ABC

/^A/m,newline=anycrlf
    12\nABC
    12\rABC
    12\r\nABC
\= Expect no match
    12\x85ABC

# Test \h

/^A\h/
    A B
    A\tB
    A\xA0B

# Test \H

/^A\H/
    AB
    A\x42B
\= Expect no match
    A B

# Test \R

/^A\R/
    A\nB
    A\rB
    A\x85B
    A\x0bB
    A\x0cB
\= Expect no match
    A B

# Test \v

/^A\v/
    A\nB
    A\rB
    A\x85B
    A\x0bB
    A\x0cB
\= Expect no match
    A B

# Test \V

/^A\V/
    A B
\= Expect no match
    A\nB
    A\rB
    A\x85B
    A\x0bB
    A\x0cB

# For repeated items, use an atomic group so that the output is the same
# for DFA matching (otherwise it may show multiple matches).

# Test \h+

/^A(?>\h+)/
    A B

# Test \H+

/^A(?>\H+)/
    AB
\= Expect no match
    A B

# Test \R+

/^A(?>\R+)/
    A\nB
    A\rB
    A\x85B
    A\x0bB
    A\x0cB
\= Expect no match
    A B

# Test \v+

/^A(?>\v+)/
    A\nB
    A\rB
    A\x85B
    A\x0bB
    A\x0cB
\= Expect no match
    A B

# Test \V+

/^A(?>\V+)/
    A B
\= Expect no match
    A\nB
    A\rB
    A\x85B
    A\x0bB
    A\x0cB

# Test \c functionality

/\c@\cA\cb\cC\cd\cE\cf\cG\ch\cI\cJ\cK\cl\cm\cN\cO\cp\cq\cr\cS\cT\cV\cW\cX\cy\cZ/
  \x00\x01\x02\x03\x9c\x09\x86\x7f\x97\x8d\x8e\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x9d\x08\x87\x18\x19\x92
  \x00\x01\x02\x03\x9c\x09\x86\x7f\x97\x8d\x8e\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x9d\x08\x87\x18\x19\x92

#if !ebcdic-nl25

/^\x15$/
  \n

/\cU/
  \x0a
  \x85

#endif

/\c[\c\\c]\c^\c_/
    \x8f\x1c\x1d\x1e\x1f

/\c?/
    A\x9fB

/\c&/

# End