VirtualBox

source: kBuild/vendor/sed/4.1.5/testsuite/ptestcases.h@ 599

Last change on this file since 599 was 599, checked in by bird, 18 years ago

GNU sed 4.1.5.

File size: 13.0 KB
Line 
1 { 0, 0, "2.8.2 Regular Expression General Requirement", NULL, },
2 { 2, 4, "bb*", "abbbc", },
3 { 2, 2, "bb*", "ababbbc", },
4 { 7, 9, "A#*::", "A:A#:qA::qA#::qA##::q", },
5 { 1, 5, "A#*::", "A##::A#::qA::qA#:q", },
6 { 0, 0, "2.8.3.1.2 BRE Special Characters", NULL, },
7 { 0, 0, "GA108", NULL, },
8 { 2, 2, "\\.", "a.c", },
9 { 2, 2, "\\[", "a[c", },
10 { 2, 2, "\\\\", "a\\c", },
11 { 2, 2, "\\*", "a*c", },
12 { 2, 2, "\\^", "a^c", },
13 { 2, 2, "\\$", "a$c", },
14 { 7, 11, "X\\*Y\\*8", "Y*8X*8X*Y*8", },
15 { 0, 0, "GA109", NULL, },
16 { 2, 2, "[.]", "a.c", },
17 { 2, 2, "[[]", "a[c", },
18 { -1, -1, "[[]", "ac", },
19 { 2, 2, "[\\]", "a\\c", },
20 { 1, 1, "[\\a]", "abc", },
21 { 2, 2, "[\\.]", "a\\.c", },
22 { 2, 2, "[\\.]", "a.\\c", },
23 { 2, 2, "[*]", "a*c", },
24 { 2, 2, "[$]", "a$c", },
25 { 2, 2, "[X*Y8]", "7*8YX", },
26 { 0, 0, "GA110", NULL, },
27 { 2, 2, "*", "a*c", },
28 { 3, 4, "*a", "*b*a*c", },
29 { 1, 5, "**9=", "***9=9", },
30 { 0, 0, "GA111", NULL, },
31 { 1, 1, "^*", "*bc", },
32 { -1, -1, "^*", "a*c", },
33 { -1, -1, "^*", "^*ab", },
34 { 1, 5, "^**9=", "***9=", },
35 { -1, -1, "^*5<*9", "5<9*5<*9", },
36 { 0, 0, "GA112", NULL, },
37 { 2, 3, "\\(*b\\)", "a*b", },
38 { -1, -1, "\\(*b\\)", "ac", },
39 { 1, 6, "A\\(**9\\)=", "A***9=79", },
40 { 0, 0, "GA113(1)", NULL, },
41 { 1, 3, "\\(^*ab\\)", "*ab", },
42 { -1, -1, "\\(^*ab\\)", "^*ab", },
43 { -1, -1, "\\(^*b\\)", "a*b", },
44 { -1, -1, "\\(^*b\\)", "^*b", },
45 { 0, 0, "GA114", NULL, },
46 { 1, 3, "a^b", "a^b", },
47 { 1, 3, "a\\^b", "a^b", },
48 { 1, 1, "^^", "^bc", },
49 { 2, 2, "\\^", "a^c", },
50 { 1, 1, "[c^b]", "^abc", },
51 { 1, 1, "[\\^ab]", "^ab", },
52 { 2, 2, "[\\^ab]", "c\\d", },
53 { -1, -1, "[^^]", "^", },
54 { 1, 3, "\\(a^b\\)", "a^b", },
55 { 1, 3, "\\(a\\^b\\)", "a^b", },
56 { 2, 2, "\\(\\^\\)", "a^b", },
57 { 0, 0, "GA115", NULL, },
58 { 3, 3, "$$", "ab$", },
59 { -1, -1, "$$", "$ab", },
60 { 2, 3, "$c", "a$c", },
61 { 2, 2, "[$]", "a$c", },
62 { 1, 2, "\\$a", "$a", },
63 { 3, 3, "\\$$", "ab$", },
64 { 2, 6, "A\\([34]$[34]\\)B", "XA4$3BY", },
65 { 0, 0, "2.8.3.1.3 Periods in BREs", NULL, },
66 { 0, 0, "GA116", NULL, },
67 { 1, 1, ".", "abc", },
68 { -1, -1, ".ab", "abc", },
69 { 1, 3, "ab.", "abc", },
70 { 1, 3, "a.b", "a,b", },
71 { -1, -1, ".......", "PqRs6", },
72 { 1, 7, ".......", "PqRs6T8", },
73 { 0, 0, "2.8.3.2 RE Bracket Expression", NULL, },
74 { 0, 0, "GA118", NULL, },
75 { 2, 2, "[abc]", "xbyz", },
76 { -1, -1, "[abc]", "xyz", },
77 { 2, 2, "[abc]", "xbay", },
78 { 0, 0, "GA119", NULL, },
79 { 2, 2, "[^a]", "abc", },
80 { 4, 4, "[^]cd]", "cd]ef", },
81 { 2, 2, "[^abc]", "axyz", },
82 { -1, -1, "[^abc]", "abc", },
83 { 3, 3, "[^[.a.]b]", "abc", },
84 { 3, 3, "[^[=a=]b]", "abc", },
85 { 2, 2, "[^-ac]", "abcde-", },
86 { 2, 2, "[^ac-]", "abcde-", },
87 { 3, 3, "[^a-b]", "abcde", },
88 { 3, 3, "[^a-bd-e]", "dec", },
89 { 2, 2, "[^---]", "-ab", },
90 { 16, 16, "[^a-zA-Z0-9]", "pqrstVWXYZ23579#", },
91 { 0, 0, "GA120(1)", NULL, },
92 { 3, 3, "[]a]", "cd]ef", },
93 { 1, 1, "[]-a]", "a_b", },
94 { 3, 3, "[][.-.]-0]", "ab0-]", },
95 { 1, 1, "[]^a-z]", "string", },
96 { 0, 0, "GA120(2)", NULL, },
97 { 4, 4, "[^]cd]", "cd]ef", },
98 { 0, 0, "[^]]*", "]]]]]]]]X", },
99 { 0, 0, "[^]]*", "]]]]]]]]", },
100 { 9, 9, "[^]]\\{1,\\}", "]]]]]]]]X", },
101 { -1, -1, "[^]]\\{1,\\}", "]]]]]]]]", },
102 { 0, 0, "GA120(3)", NULL, },
103 { 3, 3, "[c[.].]d]", "ab]cd", },
104 { 2, 8, "[a-z]*[[.].]][A-Z]*", "Abcd]DEFg", },
105 { 0, 0, "GA121", NULL, },
106 { 2, 2, "[[.a.]b]", "Abc", },
107 { 1, 1, "[[.a.]b]", "aBc", },
108 { -1, -1, "[[.a.]b]", "ABc", },
109 { 3, 3, "[^[.a.]b]", "abc", },
110 { 3, 3, "[][.-.]-0]", "ab0-]", },
111 { 3, 3, "[A-[.].]c]", "ab]!", },
112 { 0, 0, "GA122", NULL, },
113 { -2, -2, "[[.ch.]]", "abc", },
114 { -2, -2, "[[.ab.][.CD.][.EF.]]", "yZabCDEFQ9", },
115 { 0, 0, "GA125", NULL, },
116 { 2, 2, "[[=a=]b]", "Abc", },
117 { 1, 1, "[[=a=]b]", "aBc", },
118 { -1, -1, "[[=a=]b]", "ABc", },
119 { 3, 3, "[^[=a=]b]", "abc", },
120 { 0, 0, "GA126", NULL, },
121 { 0, 0, NULL, "the expected result for [[:alnum:]]* is 2-7 which is wrong" },
122 { 0, 0, "[[:alnum:]]*", " aB28gH", },
123 { 2, 7, "[[:alnum:]][[:alnum:]]*", " aB28gH", },
124 { 0, 0, NULL, "the expected result for [^[:alnum:]]* is 2-5 which is wrong" },
125 { 0, 0, "[^[:alnum:]]*", "2 ,a", },
126 { 2, 5, "[^[:alnum:]][^[:alnum:]]*", "2 ,a", },
127 { 0, 0, NULL, "the expected result for [[:alpha:]]* is 2-5 which is wrong" },
128 { 0, 0, "[[:alpha:]]*", " aBgH2", },
129 { 2, 5, "[[:alpha:]][[:alpha:]]*", " aBgH2", },
130 { 1, 6, "[^[:alpha:]]*", "2 8,a", },
131 { 1, 2, "[[:blank:]]*", " \r", },
132 { 1, 8, "[^[:blank:]]*", "aB28gH, ", },
133 { 1, 2, "[[:cntrl:]]*", "  ", },
134 { 1, 8, "[^[:cntrl:]]*", "aB2 8gh,", },
135 { 0, 0, NULL, "the expected result for [[:digit:]]* is 2-3 which is wrong" },
136 { 0, 0, "[[:digit:]]*", "a28", },
137 { 2, 3, "[[:digit:]][[:digit:]]*", "a28", },
138 { 1, 8, "[^[:digit:]]*", "aB gH,", },
139 { 1, 7, "[[:graph:]]*", "aB28gH, ", },
140 { 1, 3, "[^[:graph:]]*", " ,", },
141 { 1, 2, "[[:lower:]]*", "agB", },
142 { 1, 8, "[^[:lower:]]*", "B2 8H,a", },
143 { 1, 8, "[[:print:]]*", "aB2 8gH, ", },
144 { 1, 2, "[^[:print:]]*", "  ", },
145 { 0, 0, NULL, "the expected result for [[:punct:]]* is 2-2 which is wrong" },
146 { 0, 0, "[[:punct:]]*", "a,2", },
147 { 2, 3, "[[:punct:]][[:punct:]]*", "a,,2", },
148 { 1, 9, "[^[:punct:]]*", "aB2 8gH", },
149 { 1, 3, "[[:space:]]*", " \r", },
150 { 0, 0, NULL, "the expected result for [^[:space:]]* is 2-9 which is wrong" },
151 { 0, 0, "[^[:space:]]*", " aB28gH, ", },
152 { 2, 9, "[^[:space:]][^[:space:]]*", " aB28gH, ", },
153 { 0, 0, NULL, "the expected result for [[:upper:]]* is 2-3 which is wrong" },
154 { 0, 0, "[[:upper:]]*", "aBH2", },
155 { 2, 3, "[[:upper:]][[:upper:]]*", "aBH2", },
156 { 1, 8, "[^[:upper:]]*", "a2 8g,B", },
157 { 0, 0, NULL, "the expected result for [[:xdigit:]]* is 2-5 which is wrong" },
158 { 0, 0, "[[:xdigit:]]*", "gaB28h", },
159 { 2, 5, "[[:xdigit:]][[:xdigit:]]*", "gaB28h", },
160 { 0, 0, NULL, "the expected result for [^[:xdigit:]]* is 2-7 which is wrong" },
161 { 2, 7, "[^[:xdigit:]][^[:xdigit:]]*", "a gH,2", },
162 { 0, 0, "GA127", NULL, },
163 { -2, -2, "[b-a]", "abc", },
164 { 1, 1, "[a-c]", "bbccde", },
165 { 2, 2, "[a-b]", "-bc", },
166 { 3, 3, "[a-z0-9]", "AB0", },
167 { 3, 3, "[^a-b]", "abcde", },
168 { 3, 3, "[^a-bd-e]", "dec", },
169 { 1, 1, "[]-a]", "a_b", },
170 { 2, 2, "[+--]", "a,b", },
171 { 2, 2, "[--/]", "a.b", },
172 { 2, 2, "[^---]", "-ab", },
173 { 3, 3, "[][.-.]-0]", "ab0-]", },
174 { 3, 3, "[A-[.].]c]", "ab]!", },
175 { 2, 6, "bc[d-w]xy", "abchxyz", },
176 { 0, 0, "GA129", NULL, },
177 { 1, 1, "[a-cd-f]", "dbccde", },
178 { -1, -1, "[a-ce-f]", "dBCCdE", },
179 { 2, 4, "b[n-zA-M]Y", "absY9Z", },
180 { 2, 4, "b[n-zA-M]Y", "abGY9Z", },
181 { 0, 0, "GA130", NULL, },
182 { 3, 3, "[-xy]", "ac-", },
183 { 2, 4, "c[-xy]D", "ac-D+", },
184 { 2, 2, "[--/]", "a.b", },
185 { 2, 4, "c[--/]D", "ac.D+b", },
186 { 2, 2, "[^-ac]", "abcde-", },
187 { 1, 3, "a[^-ac]c", "abcde-", },
188 { 3, 3, "[xy-]", "zc-", },
189 { 2, 4, "c[xy-]7", "zc-786", },
190 { 2, 2, "[^ac-]", "abcde-", },
191 { 2, 4, "a[^ac-]c", "5abcde-", },
192 { 2, 2, "[+--]", "a,b", },
193 { 2, 4, "a[+--]B", "Xa,By", },
194 { 2, 2, "[^---]", "-ab", },
195 { 4, 6, "X[^---]Y", "X-YXaYXbY", },
196 { 0, 0, "2.8.3.3 BREs Matching Multiple Characters", NULL, },
197 { 0, 0, "GA131", NULL, },
198 { 3, 4, "cd", "abcdeabcde", },
199 { 1, 2, "ag*b", "abcde", },
200 { -1, -1, "[a-c][e-f]", "abcdef", },
201 { 3, 4, "[a-c][e-f]", "acbedf", },
202 { 4, 8, "abc*XYZ", "890abXYZ#*", },
203 { 4, 9, "abc*XYZ", "890abcXYZ#*", },
204 { 4, 15, "abc*XYZ", "890abcccccccXYZ#*", },
205 { -1, -1, "abc*XYZ", "890abc*XYZ#*", },
206 { 0, 0, "GA132", NULL, },
207 { 2, 4, "\\(*bc\\)", "a*bc", },
208 { 1, 2, "\\(ab\\)", "abcde", },
209 { 1, 10, "\\(a\\(b\\(c\\(d\\(e\\(f\\(g\\)h\\(i\\(j\\)\\)\\)\\)\\)\\)\\)\\)", "abcdefghijk", },
210 { 3, 8, "43\\(2\\(6\\)*0\\)AB", "654320ABCD", },
211 { 3, 9, "43\\(2\\(7\\)*0\\)AB", "6543270ABCD", },
212 { 3, 12, "43\\(2\\(7\\)*0\\)AB", "6543277770ABCD", },
213 { 0, 0, "GA133", NULL, },
214 { 1, 10, "\\(a\\(b\\(c\\(d\\(e\\(f\\(g\\)h\\(i\\(j\\)\\)\\)\\)\\)\\)\\)\\)", "abcdefghijk", },
215 { -1, -1, "\\(a\\(b\\(c\\(d\\(e\\(f\\(g\\)h\\(i\\(k\\)\\)\\)\\)\\)\\)\\)\\)", "abcdefghijk", },
216 { 0, 0, "GA134", NULL, },
217 { 2, 4, "\\(bb*\\)", "abbbc", },
218 { 2, 2, "\\(bb*\\)", "ababbbc", },
219 { 1, 6, "a\\(.*b\\)", "ababbbc", },
220 { 1, 2, "a\\(b*\\)", "ababbbc", },
221 { 1, 20, "a\\(.*b\\)c", "axcaxbbbcsxbbbbbbbbc", },
222 { 0, 0, "GA135", NULL, },
223 { 1, 7, "\\(a\\(b\\(c\\(d\\(e\\)\\)\\)\\)\\)\\4", "abcdededede", },
224 { 0, 0, NULL, "POSIX does not really specify whether a\\(b\\)*c\\1 matches acb." },
225 { 0, 0, NULL, "back references are supposed to expand to the last match, but what" },
226 { 0, 0, NULL, "if there never was a match as in this case?" },
227 { -1, -1, "a\\(b\\)*c\\1", "acb", },
228 { 1, 11, "\\(a\\(b\\(c\\(d\\(e\\(f\\(g\\)h\\(i\\(j\\)\\)\\)\\)\\)\\)\\)\\)\\9", "abcdefghijjk", },
229 { 0, 0, "GA136", NULL, },
230 { 0, 0, NULL, "These two tests have the same problem as the test in GA135. No match" },
231 { 0, 0, NULL, "of a subexpression, why should the back reference be usable?" },
232 { 0, 0, NULL, "1 2 a\\(b\\)*c\\1 acb" },
233 { 0, 0, NULL, "4 7 a\\(b\\(c\\(d\\(f\\)*\\)\\)\\)\\4¦xYzabcdePQRST" },
234 { -1, -1, "a\\(b\\)*c\\1", "acb", },
235 { -1, -1, "a\\(b\\(c\\(d\\(f\\)*\\)\\)\\)\\4", "xYzabcdePQRST", },
236 { 0, 0, "GA137", NULL, },
237 { -2, -2, "\\(a\\(b\\)\\)\\3", "foo", },
238 { -2, -2, "\\(a\\(b\\)\\)\\(a\\(b\\)\\)\\5", "foo", },
239 { 0, 0, "GA138", NULL, },
240 { 1, 2, "ag*b", "abcde", },
241 { 1, 10, "a.*b", "abababvbabc", },
242 { 2, 5, "b*c", "abbbcdeabbbbbbcde", },
243 { 2, 5, "bbb*c", "abbbcdeabbbbbbcde", },
244 { 1, 5, "a\\(b\\)*c\\1", "abbcbbb", },
245 { -1, -1, "a\\(b\\)*c\\1", "abbdbd", },
246 { 0, 0, "\\([a-c]*\\)\\1", "abcacdef", },
247 { 1, 6, "\\([a-c]*\\)\\1", "abcabcabcd", },
248 { 1, 2, "a^*b", "ab", },
249 { 1, 5, "a^*b", "a^^^b", },
250 { 0, 0, "GA139", NULL, },
251 { 1, 2, "a\\{2\\}", "aaaa", },
252 { 1, 7, "\\([a-c]*\\)\\{0,\\}", "aabcaab", },
253 { 1, 2, "\\(a\\)\\1\\{1,2\\}", "aabc", },
254 { 1, 3, "\\(a\\)\\1\\{1,2\\}", "aaaabc", },
255 { 0, 0, NULL, "the expression \\(\\(a\\)\\1\\)\\{1,2\\} is ill-formed, using \\2" },
256 { 1, 4, "\\(\\(a\\)\\2\\)\\{1,2\\}", "aaaabc", },
257 { 0, 0, "GA140", NULL, },
258 { 1, 2, "a\\{2\\}", "aaaa", },
259 { -1, -1, "a\\{2\\}", "abcd", },
260 { 0, 0, "a\\{0\\}", "aaaa", },
261 { 1, 64, "a\\{64\\}", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", },
262 { 0, 0, "GA141", NULL, },
263 { 1, 7, "\\([a-c]*\\)\\{0,\\}", "aabcaab", },
264 { 0, 0, NULL, "the expected result for \\([a-c]*\\)\\{2,\\} is failure which isn't correct" },
265 { 1, 3, "\\([a-c]*\\)\\{2,\\}", "abcdefg", },
266 { 1, 3, "\\([a-c]*\\)\\{1,\\}", "abcdefg", },
267 { -1, -1, "a\\{64,\\}", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", },
268 { 0, 0, "GA142", NULL, },
269 { 1, 3, "a\\{2,3\\}", "aaaa", },
270 { -1, -1, "a\\{2,3\\}", "abcd", },
271 { 0, 0, "\\([a-c]*\\)\\{0,0\\}", "foo", },
272 { 1, 63, "a\\{1,63\\}", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", },
273 { 0, 0, "2.8.3.4 BRE Precedence", NULL, },
274 { 0, 0, "GA143", NULL, },
275 { 0, 0, NULL, "There are numerous bugs in the original version." },
276 { 2, 19, "\\^\\[[[.].]]\\\\(\\\\1\\\\)\\*\\\\{1,2\\\\}\\$", "a^[]\\(\\1\\)*\\{1,2\\}$b", },
277 { 1, 6, "[[=*=]][[=\\=]][[=]=]][[===]][[...]][[:punct:]]", "*\\]=.;", },
278 { 1, 6, "[$\\(*\\)^]*", "$\\()*^", },
279 { 1, 1, "[\\1]", "1", },
280 { 1, 1, "[\\{1,2\\}]", "{", },
281 { 0, 0, NULL, "the expected result for \\(*\\)*\\1* is 2-2 which isn't correct" },
282 { 0, 0, "\\(*\\)*\\1*", "a*b*11", },
283 { 2, 3, "\\(*\\)*\\1*b", "a*b*11", },
284 { 0, 0, NULL, "the expected result for \\(a\\(b\\{1,2\\}\\)\\{1,2\\}\\) is 1-5 which isn't correct" },
285 { 1, 3, "\\(a\\(b\\{1,2\\}\\)\\{1,2\\}\\)", "abbab", },
286 { 1, 5, "\\(a\\(b\\{1,2\\}\\)\\)\\{1,2\\}", "abbab", },
287 { 1, 1, "^\\(^\\(^a$\\)$\\)$", "a", },
288 { 1, 2, "\\(a\\)\\1$", "aa", },
289 { 1, 3, "ab*", "abb", },
290 { 1, 4, "ab\\{2,4\\}", "abbbc", },
291 { 0, 0, "2.8.3.5 BRE Expression Anchoring", NULL, },
292 { 0, 0, "GA144", NULL, },
293 { 1, 1, "^a", "abc", },
294 { -1, -1, "^b", "abc", },
295 { -1, -1, "^[a-zA-Z]", "99Nine", },
296 { 1, 4, "^[a-zA-Z]*", "Nine99", },
297 { 0, 0, "GA145(1)", NULL, },
298 { 1, 2, "\\(^a\\)\\1", "aabc", },
299 { -1, -1, "\\(^a\\)\\1", "^a^abc", },
300 { 1, 2, "\\(^^a\\)", "^a", },
301 { 1, 1, "\\(^^\\)", "^^", },
302 { 1, 3, "\\(^abc\\)", "abcdef", },
303 { -1, -1, "\\(^def\\)", "abcdef", },
304 { 0, 0, "GA146", NULL, },
305 { 3, 3, "a$", "cba", },
306 { -1, -1, "a$", "abc", },
307 { 5, 7, "[a-z]*$", "99ZZxyz", },
308 { 0, 0, NULL, "the expected result for [a-z]*$ is failure which isn't correct" },
309 { 10, 9, "[a-z]*$", "99ZZxyz99", },
310 { 3, 3, "$$", "ab$", },
311 { -1, -1, "$$", "$ab", },
312 { 3, 3, "\\$$", "ab$", },
313 { 0, 0, "GA147(1)", NULL, },
314 { -1, -1, "\\(a$\\)\\1", "bcaa", },
315 { -1, -1, "\\(a$\\)\\1", "ba$", },
316 { -1, -1, "\\(ab$\\)", "ab$", },
317 { 1, 2, "\\(ab$\\)", "ab", },
318 { 4, 6, "\\(def$\\)", "abcdef", },
319 { -1, -1, "\\(abc$\\)", "abcdef", },
320 { 0, 0, "GA148", NULL, },
321 { 0, 0, "^$", "", },
322 { 1, 3, "^abc$", "abc", },
323 { -1, -1, "^xyz$", "^xyz^", },
324 { -1, -1, "^234$", "^234$", },
325 { 1, 9, "^[a-zA-Z0-9]*$", "2aA3bB9zZ", },
326 { -1, -1, "^[a-z0-9]*$", "2aA3b#B9zZ", },
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette