]> git.proxmox.com Git - rustc.git/blob - vendor/regex-automata/tests/data/no-unicode.toml
New upstream version 1.73.0+dfsg1
[rustc.git] / vendor / regex-automata / tests / data / no-unicode.toml
1 [[tests]]
2 name = "invalid-utf8-literal1"
3 regex = '\xFF'
4 input = '\xFF'
5 matches = [[0, 1]]
6 unicode = false
7 utf8 = false
8 unescape = true
9
10
11 [[tests]]
12 name = "mixed"
13 regex = '(.+)(?-u)(.+)'
14 input = '\xCE\x93\xCE\x94\xFF'
15 matches = [[0, 5]]
16 utf8 = false
17 unescape = true
18
19
20 [[tests]]
21 name = "case1"
22 regex = "a"
23 input = "A"
24 matches = [[0, 1]]
25 case_insensitive = true
26 unicode = false
27
28 [[tests]]
29 name = "case2"
30 regex = "[a-z]+"
31 input = "AaAaA"
32 matches = [[0, 5]]
33 case_insensitive = true
34 unicode = false
35
36 [[tests]]
37 name = "case3"
38 regex = "[a-z]+"
39 input = "aA\u212AaA"
40 matches = [[0, 7]]
41 case_insensitive = true
42
43 [[tests]]
44 name = "case4"
45 regex = "[a-z]+"
46 input = "aA\u212AaA"
47 matches = [[0, 2], [5, 7]]
48 case_insensitive = true
49 unicode = false
50
51
52 [[tests]]
53 name = "negate1"
54 regex = "[^a]"
55 input = "δ"
56 matches = [[0, 2]]
57
58 [[tests]]
59 name = "negate2"
60 regex = "[^a]"
61 input = "δ"
62 matches = [[0, 1], [1, 2]]
63 unicode = false
64 utf8 = false
65
66
67 [[tests]]
68 name = "dotstar-prefix1"
69 regex = "a"
70 input = '\xFFa'
71 matches = [[1, 2]]
72 unicode = false
73 utf8 = false
74 unescape = true
75
76 [[tests]]
77 name = "dotstar-prefix2"
78 regex = "a"
79 input = '\xFFa'
80 matches = [[1, 2]]
81 utf8 = false
82 unescape = true
83
84
85 [[tests]]
86 name = "null-bytes1"
87 regex = '[^\x00]+\x00'
88 input = 'foo\x00'
89 matches = [[0, 4]]
90 unicode = false
91 utf8 = false
92 unescape = true
93
94
95 [[tests]]
96 name = "word-ascii"
97 regex = '\w+'
98 input = "aδ"
99 matches = [[0, 1]]
100 unicode = false
101
102 [[tests]]
103 name = "word-unicode"
104 regex = '\w+'
105 input = "aδ"
106 matches = [[0, 3]]
107
108 [[tests]]
109 name = "decimal-ascii"
110 regex = '\d+'
111 input = "1२३9"
112 matches = [[0, 1], [7, 8]]
113 unicode = false
114
115 [[tests]]
116 name = "decimal-unicode"
117 regex = '\d+'
118 input = "1२३9"
119 matches = [[0, 8]]
120
121 [[tests]]
122 name = "space-ascii"
123 regex = '\s+'
124 input = " \u1680"
125 matches = [[0, 1]]
126 unicode = false
127
128 [[tests]]
129 name = "space-unicode"
130 regex = '\s+'
131 input = " \u1680"
132 matches = [[0, 4]]
133
134
135 [[tests]]
136 # See: https://github.com/rust-lang/regex/issues/484
137 name = "iter1-bytes"
138 regex = ''
139 input = "☃"
140 matches = [[0, 0], [1, 1], [2, 2], [3, 3]]
141 utf8 = false
142
143 [[tests]]
144 # See: https://github.com/rust-lang/regex/issues/484
145 name = "iter1-utf8"
146 regex = ''
147 input = "☃"
148 matches = [[0, 0], [3, 3]]
149
150 [[tests]]
151 # See: https://github.com/rust-lang/regex/issues/484
152 # Note that iter2-utf8 doesn't make sense here, since the input isn't UTF-8.
153 name = "iter2-bytes"
154 regex = ''
155 input = 'b\xFFr'
156 matches = [[0, 0], [1, 1], [2, 2], [3, 3]]
157 unescape = true
158 utf8 = false