2 # Copyright (C) 2000-2020 Free Software Foundation, Inc.
3 # This file is part of the GNU C Library.
4 # Contributes by Ulrich Drepper <drepper@redhat.com>.
7 # The GNU C Library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2.1 of the License, or (at your option) any later version.
12 # The GNU C Library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # Lesser General Public License for more details.
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with the GNU C Library; if not, see
19 # <https://www.gnu.org/licenses/>.
22 # Derived from the IEEE 2003.2 text. The standard only contains some
23 # wording describing the situations to be tested. It does not specify
24 # any specific tests. I.e., the tests below are in no case sufficient.
25 # They are hopefully necessary, though.
29 # http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap09.html
31 # > RE Bracket Expression
33 # > Range expressions are, historically, an integral part of REs.
34 # > However, the requirements of "natural language behavior" and
35 # > portability do conflict. In the POSIX locale, ranges must be treated
36 # > according to the collating sequence and include such characters that
37 # > fall within the range based on that collating sequence, regardless
38 # > of character values. In other locales, ranges have unspecified behavior.
40 # > The current standard leaves unspecified the behavior of a range
41 # > expression outside the POSIX locale. This makes it clearer that
42 # > conforming applications should avoid range expressions outside the
43 # > POSIX locale, and it allows implementations and compatible user-mode
44 # > matchers to interpret range expressions using native order, CEO,
45 # > collation sequence, or other, more advanced techniques. The concerns
46 # > which led to this change were raised in IEEE PASC interpretation
47 # > 1003.2 #43 and others, and related to ambiguities in the
48 # > specification of how multi-character collating elements should be
49 # > handled in range expressions. These ambiguities had led to multiple
50 # > interpretations of the specification, in conflicting ways, which led
51 # > to varying implementations. As noted above, efforts were made to
52 # > resolve the differences, but no solution has been found that would
53 # > be specific enough to allow for portable software while not
54 # > invalidating existing implementations.
56 # Therefore, using [a-z] does not make much sense except in the C/POSIX locale.
57 # The new iso14651_t1_common lists upper case and lower case Latin characters
58 # in a different order than the old one which causes surprising results
59 # for example in the de_DE locale: [a-z] now includes A because A comes
60 # after a in iso14651_t1_common but does not include Z because that comes
61 # after z in iso14651_t1_common.
63 # This lead to several bugs and problems with user scripts that do not
64 # expect [a-z] to match uppercase characters.
66 # See the following bugs:
67 # https://sourceware.org/bugzilla/show_bug.cgi?id=23393
68 # https://sourceware.org/bugzilla/show_bug.cgi?id=23420
70 # No consensus exists on how best to handle the changes so the
71 # iso14651_t1_common collation element order (CEO) has been changed to
72 # deinterlace the a-z and A-Z regions.
74 # With the deinterlacing commit ac3a3b4b0d561d776b60317d6a926050c8541655
75 # could be reverted to re-test the correct non-interleaved expectations.
77 # Please note that despite the region being deinterlaced, the ordering
78 # of collation remains the same. In glibc we implement CEO and because of
79 # that we can reorder the elements to reorder ranges without impacting
80 # collation which depends on weights. The collation element ordering
81 # could have been changed to include just a-z, A-Z, and 0-9 in three
82 # distinct blocks, but this needs more discussion by the community.
85 C "!#%+,-./01234567889" "!#%+,-./01234567889" 0
86 C ":;=@ABCDEFGHIJKLMNO" ":;=@ABCDEFGHIJKLMNO" 0
87 C "PQRSTUVWXYZ]abcdefg" "PQRSTUVWXYZ]abcdefg" 0
88 C "hijklmnopqrstuvwxyz" "hijklmnopqrstuvwxyz" 0
92 C "\"$&'()" "\\\"\\$\\&\\'\\(\\)" 0
93 C "*?[\\`|" "\\*\\?\\[\\\\\\`\\|" 0
97 C "?*[" "[?*[][?*[][?*[]" 0
103 C "aa/b" "?/b" NOMATCH
104 C "aa/b" "a?b" NOMATCH
105 C "a/bb" "a/?" NOMATCH
108 C "abc" "[abc]" NOMATCH
109 C "x" "[abc]" NOMATCH
116 C "xyz" "[!abc]" NOMATCH
118 C "a" "[!abc]" NOMATCH
122 C "abc]" "[][abc]" NOMATCH
123 C "[]abc" "[][]abc" NOMATCH
125 C "aa]" "[!]a]" NOMATCH
132 C "-" "[[.-.][.].]]" 0
133 C "-" "[[.].][.-.]]" 0
134 C "-" "[[.-.][=u=]]" 0
135 C "-" "[[.-.][:alpha:]]" 0
136 C "a" "[![.a.]]" NOMATCH
139 C "a" "[[.b.]]" NOMATCH
140 C "a" "[[.b.][.c.]]" NOMATCH
141 C "a" "[[.b.][=b=]]" NOMATCH
147 C "b" "[[=a=][=b=]]" 0
148 C "a" "[[=a=][=b=]]" 0
149 C "a" "[[=a=][.b.]]" 0
150 C "a" "[[=a=][:digit:]]" 0
153 C "=" "[[=a=]b]" NOMATCH
154 C "]" "[[=a=]b]" NOMATCH
155 C "a" "[[=b=][=c=]]" NOMATCH
156 C "a" "[[=b=][.].]]" NOMATCH
157 C "a" "[[=b=][:digit:]]" NOMATCH
160 C "a" "[[:alnum:]]" 0
161 C "a" "[![:alnum:]]" NOMATCH
162 C "-" "[[:alnum:]]" NOMATCH
163 C "a]a" "[[:alnum:]]a" NOMATCH
164 C "-" "[[:alnum:]-]" 0
165 C "aa" "[[:alnum:]]a" 0
166 C "-" "[![:alnum:]]" 0
167 C "]" "[!][:alnum:]]" NOMATCH
168 C "[" "[![:alnum:][]" NOMATCH
169 C "a" "[[:alnum:]]" 0
170 C "b" "[[:alnum:]]" 0
171 C "c" "[[:alnum:]]" 0
172 C "d" "[[:alnum:]]" 0
173 C "e" "[[:alnum:]]" 0
174 C "f" "[[:alnum:]]" 0
175 C "g" "[[:alnum:]]" 0
176 C "h" "[[:alnum:]]" 0
177 C "i" "[[:alnum:]]" 0
178 C "j" "[[:alnum:]]" 0
179 C "k" "[[:alnum:]]" 0
180 C "l" "[[:alnum:]]" 0
181 C "m" "[[:alnum:]]" 0
182 C "n" "[[:alnum:]]" 0
183 C "o" "[[:alnum:]]" 0
184 C "p" "[[:alnum:]]" 0
185 C "q" "[[:alnum:]]" 0
186 C "r" "[[:alnum:]]" 0
187 C "s" "[[:alnum:]]" 0
188 C "t" "[[:alnum:]]" 0
189 C "u" "[[:alnum:]]" 0
190 C "v" "[[:alnum:]]" 0
191 C "w" "[[:alnum:]]" 0
192 C "x" "[[:alnum:]]" 0
193 C "y" "[[:alnum:]]" 0
194 C "z" "[[:alnum:]]" 0
195 C "A" "[[:alnum:]]" 0
196 C "B" "[[:alnum:]]" 0
197 C "C" "[[:alnum:]]" 0
198 C "D" "[[:alnum:]]" 0
199 C "E" "[[:alnum:]]" 0
200 C "F" "[[:alnum:]]" 0
201 C "G" "[[:alnum:]]" 0
202 C "H" "[[:alnum:]]" 0
203 C "I" "[[:alnum:]]" 0
204 C "J" "[[:alnum:]]" 0
205 C "K" "[[:alnum:]]" 0
206 C "L" "[[:alnum:]]" 0
207 C "M" "[[:alnum:]]" 0
208 C "N" "[[:alnum:]]" 0
209 C "O" "[[:alnum:]]" 0
210 C "P" "[[:alnum:]]" 0
211 C "Q" "[[:alnum:]]" 0
212 C "R" "[[:alnum:]]" 0
213 C "S" "[[:alnum:]]" 0
214 C "T" "[[:alnum:]]" 0
215 C "U" "[[:alnum:]]" 0
216 C "V" "[[:alnum:]]" 0
217 C "W" "[[:alnum:]]" 0
218 C "X" "[[:alnum:]]" 0
219 C "Y" "[[:alnum:]]" 0
220 C "Z" "[[:alnum:]]" 0
221 C "0" "[[:alnum:]]" 0
222 C "1" "[[:alnum:]]" 0
223 C "2" "[[:alnum:]]" 0
224 C "3" "[[:alnum:]]" 0
225 C "4" "[[:alnum:]]" 0
226 C "5" "[[:alnum:]]" 0
227 C "6" "[[:alnum:]]" 0
228 C "7" "[[:alnum:]]" 0
229 C "8" "[[:alnum:]]" 0
230 C "9" "[[:alnum:]]" 0
231 C "!" "[[:alnum:]]" NOMATCH
232 C "#" "[[:alnum:]]" NOMATCH
233 C "%" "[[:alnum:]]" NOMATCH
234 C "+" "[[:alnum:]]" NOMATCH
235 C "," "[[:alnum:]]" NOMATCH
236 C "-" "[[:alnum:]]" NOMATCH
237 C "." "[[:alnum:]]" NOMATCH
238 C "/" "[[:alnum:]]" NOMATCH
239 C ":" "[[:alnum:]]" NOMATCH
240 C ";" "[[:alnum:]]" NOMATCH
241 C "=" "[[:alnum:]]" NOMATCH
242 C "@" "[[:alnum:]]" NOMATCH
243 C "[" "[[:alnum:]]" NOMATCH
244 C "\\" "[[:alnum:]]" NOMATCH
245 C "]" "[[:alnum:]]" NOMATCH
246 C "^" "[[:alnum:]]" NOMATCH
247 C "_" "[[:alnum:]]" NOMATCH
248 C "{" "[[:alnum:]]" NOMATCH
249 C "}" "[[:alnum:]]" NOMATCH
250 C "~" "[[:alnum:]]" NOMATCH
251 C "\"" "[[:alnum:]]" NOMATCH
252 C "$" "[[:alnum:]]" NOMATCH
253 C "&" "[[:alnum:]]" NOMATCH
254 C "'" "[[:alnum:]]" NOMATCH
255 C "(" "[[:alnum:]]" NOMATCH
256 C ")" "[[:alnum:]]" NOMATCH
257 C "*" "[[:alnum:]]" NOMATCH
258 C "?" "[[:alnum:]]" NOMATCH
259 C "`" "[[:alnum:]]" NOMATCH
260 C "|" "[[:alnum:]]" NOMATCH
261 C "<" "[[:alnum:]]" NOMATCH
262 C ">" "[[:alnum:]]" NOMATCH
263 C "\t" "[[:cntrl:]]" 0
264 C "t" "[[:cntrl:]]" NOMATCH
265 C "t" "[[:lower:]]" 0
266 C "\t" "[[:lower:]]" NOMATCH
267 C "T" "[[:lower:]]" NOMATCH
268 C "\t" "[[:space:]]" 0
269 C "t" "[[:space:]]" NOMATCH
270 C "t" "[[:alpha:]]" 0
271 C "\t" "[[:alpha:]]" NOMATCH
272 C "0" "[[:digit:]]" 0
273 C "\t" "[[:digit:]]" NOMATCH
274 C "t" "[[:digit:]]" NOMATCH
275 C "\t" "[[:print:]]" NOMATCH
276 C "t" "[[:print:]]" 0
277 C "T" "[[:upper:]]" 0
278 C "\t" "[[:upper:]]" NOMATCH
279 C "t" "[[:upper:]]" NOMATCH
280 C "\t" "[[:blank:]]" 0
281 C "t" "[[:blank:]]" NOMATCH
282 C "\t" "[[:graph:]]" NOMATCH
283 C "t" "[[:graph:]]" 0
284 C "." "[[:punct:]]" 0
285 C "t" "[[:punct:]]" NOMATCH
286 C "\t" "[[:punct:]]" NOMATCH
287 C "0" "[[:xdigit:]]" 0
288 C "\t" "[[:xdigit:]]" NOMATCH
289 C "a" "[[:xdigit:]]" 0
290 C "A" "[[:xdigit:]]" 0
291 C "t" "[[:xdigit:]]" NOMATCH
292 C "a" "[[alpha]]" NOMATCH
293 C "a" "[[alpha:]]" NOMATCH
295 C "a]" "[[alpha:]]" 0
296 C "a" "[[:alpha:][.b.]]" 0
297 C "a" "[[:alpha:][=b=]]" 0
298 C "a" "[[:alpha:][:digit:]]" 0
299 C "a" "[[:digit:][:alpha:]]" 0
305 C "a" "[b-c]" NOMATCH
306 C "d" "[b-c]" NOMATCH
307 C "B" "[a-c]" NOMATCH
308 C "b" "[A-C]" NOMATCH
310 C "as" "[a-ca-z]" NOMATCH
313 C "a" "[[.a.]-[.c.]]" 0
316 C "b" "[[.a.]-[.c.]]" 0
319 C "c" "[[.a.]-[.c.]]" 0
320 C "d" "[[.a.]-c]" NOMATCH
321 C "d" "[a-[.c.]]" NOMATCH
322 C "d" "[[.a.]-[.c.]]" NOMATCH
325 C "a" "[c-a]" NOMATCH
326 C "a" "[[.c.]-a]" NOMATCH
327 C "a" "[c-[.a.]]" NOMATCH
328 C "a" "[[.c.]-[.a.]]" NOMATCH
329 C "c" "[c-a]" NOMATCH
330 C "c" "[[.c.]-a]" NOMATCH
331 C "c" "[c-[.a.]]" NOMATCH
332 C "c" "[[.c.]-[.a.]]" NOMATCH
336 C "d" "[a-c0-9]" NOMATCH
337 C "B" "[a-c0-9]" NOMATCH
342 C "-" "[!-a]" NOMATCH
346 C "a:" "a[0-9-a]" NOMATCH
354 C "as" "[a-c][a-z]" 0
358 C "asd/sdf" "as*df" 0
361 C "asd/sdf" "as*dg" NOMATCH
363 C "asdf" "as*df?" NOMATCH
384 C "//" "//" 0 PATHNAME
385 C "/.a" "/*" 0 PATHNAME
386 C "/.a" "/?a" 0 PATHNAME
387 C "/.a" "/[!a-z]a" 0 PATHNAME
388 C "/.a/.b" "/*/?b" 0 PATHNAME
391 C "/" "?" NOMATCH PATHNAME
392 C "/" "*" NOMATCH PATHNAME
393 C "a/b" "a?b" NOMATCH PATHNAME
394 C "/.a/.b" "/*b" NOMATCH PATHNAME
403 C "/$" "\\/\\$" NOMATCH NOESCAPE
404 C "/\\$" "\\/\\$" NOMATCH NOESCAPE
405 C "\\/\\$" "\\/\\$" 0 NOESCAPE
408 C ".asd" ".*" 0 PERIOD
409 C "/.asd" "*" 0 PERIOD
410 C "/as/.df" "*/?*f" 0 PERIOD
411 C "..asd" ".[!a-z]*" 0 PERIOD
414 C ".asd" "*" NOMATCH PERIOD
415 C ".asd" "?asd" NOMATCH PERIOD
416 C ".asd" "[!a-z]*" NOMATCH PERIOD
419 C "/." "/." 0 PATHNAME|PERIOD
420 C "/.a./.b." "/.*/.*" 0 PATHNAME|PERIOD
421 C "/.a./.b." "/.??/.??" 0 PATHNAME|PERIOD
424 C "/." "*" NOMATCH PATHNAME|PERIOD
425 C "/." "/*" NOMATCH PATHNAME|PERIOD
426 C "/." "/?" NOMATCH PATHNAME|PERIOD
427 C "/." "/[!a-z]" NOMATCH PATHNAME|PERIOD
428 C "/a./.b." "/*/*" NOMATCH PATHNAME|PERIOD
429 C "/a./.b." "/??/???" NOMATCH PATHNAME|PERIOD
431 # Some home-grown tests.
432 C "foobar" "foo*[abc]z" NOMATCH
433 C "foobaz" "foo*[abc][xyz]" 0
434 C "foobaz" "foo?*[abc][xyz]" 0
435 C "foobaz" "foo?*[abc][x/yz]" 0
436 C "foobaz" "foo?*[abc]/[xyz]" NOMATCH PATHNAME
437 C "a" "a/" NOMATCH PATHNAME
438 C "a/" "a" NOMATCH PATHNAME
439 C "//a" "/a" NOMATCH PATHNAME
440 C "/a" "//a" NOMATCH PATHNAME
443 C "cz" "[ab-]z" NOMATCH
447 C "cz" "[-ab]z" NOMATCH
452 C "-" "[\\\\-a]" NOMATCH
453 C "\\" "[\\]-a]" NOMATCH
457 C "-" "[\\]-a]" NOMATCH
458 C "\\" "[!\\\\-a]" NOMATCH
459 C "_" "[!\\\\-a]" NOMATCH
460 C "a" "[!\\\\-a]" NOMATCH
464 C "\\" "[\\!-]" NOMATCH
468 C "-" "[Z-\\\\]" NOMATCH
473 C "-" "[Z-\\]]" NOMATCH
475 # Following are tests outside the scope of IEEE 2003.2 since they are using
476 # locales other than the C locale. The main focus of the tests is on the
477 # handling of ranges and the recognition of character (vs bytes).
478 de_DE.ISO-8859-1 "a" "[a-z]" 0
479 de_DE.ISO-8859-1 "z" "[a-z]" 0
480 de_DE.ISO-8859-1 "ä" "[a-z]" 0
481 de_DE.ISO-8859-1 "ö" "[a-z]" 0
482 de_DE.ISO-8859-1 "ü" "[a-z]" 0
483 de_DE.ISO-8859-1 "A" "[a-z]" NOMATCH
484 de_DE.ISO-8859-1 "Z" "[a-z]" NOMATCH
485 de_DE.ISO-8859-1 "Ä" "[a-z]" NOMATCH
486 de_DE.ISO-8859-1 "Ö" "[a-z]" NOMATCH
487 de_DE.ISO-8859-1 "Ü" "[a-z]" NOMATCH
488 de_DE.ISO-8859-1 "a" "[A-Z]" NOMATCH
489 de_DE.ISO-8859-1 "z" "[A-Z]" NOMATCH
490 de_DE.ISO-8859-1 "ä" "[A-Z]" NOMATCH
491 de_DE.ISO-8859-1 "ö" "[A-Z]" NOMATCH
492 de_DE.ISO-8859-1 "ü" "[A-Z]" NOMATCH
493 de_DE.ISO-8859-1 "A" "[A-Z]" 0
494 de_DE.ISO-8859-1 "Z" "[A-Z]" 0
495 de_DE.ISO-8859-1 "Ä" "[A-Z]" 0
496 de_DE.ISO-8859-1 "Ö" "[A-Z]" 0
497 de_DE.ISO-8859-1 "Ü" "[A-Z]" 0
498 de_DE.ISO-8859-1 "a" "[[:lower:]]" 0
499 de_DE.ISO-8859-1 "z" "[[:lower:]]" 0
500 de_DE.ISO-8859-1 "ä" "[[:lower:]]" 0
501 de_DE.ISO-8859-1 "ö" "[[:lower:]]" 0
502 de_DE.ISO-8859-1 "ü" "[[:lower:]]" 0
503 de_DE.ISO-8859-1 "A" "[[:lower:]]" NOMATCH
504 de_DE.ISO-8859-1 "Z" "[[:lower:]]" NOMATCH
505 de_DE.ISO-8859-1 "Ä" "[[:lower:]]" NOMATCH
506 de_DE.ISO-8859-1 "Ö" "[[:lower:]]" NOMATCH
507 de_DE.ISO-8859-1 "Ü" "[[:lower:]]" NOMATCH
508 de_DE.ISO-8859-1 "a" "[[:upper:]]" NOMATCH
509 de_DE.ISO-8859-1 "z" "[[:upper:]]" NOMATCH
510 de_DE.ISO-8859-1 "ä" "[[:upper:]]" NOMATCH
511 de_DE.ISO-8859-1 "ö" "[[:upper:]]" NOMATCH
512 de_DE.ISO-8859-1 "ü" "[[:upper:]]" NOMATCH
513 de_DE.ISO-8859-1 "A" "[[:upper:]]" 0
514 de_DE.ISO-8859-1 "Z" "[[:upper:]]" 0
515 de_DE.ISO-8859-1 "Ä" "[[:upper:]]" 0
516 de_DE.ISO-8859-1 "Ö" "[[:upper:]]" 0
517 de_DE.ISO-8859-1 "Ü" "[[:upper:]]" 0
518 de_DE.ISO-8859-1 "a" "[[:alpha:]]" 0
519 de_DE.ISO-8859-1 "z" "[[:alpha:]]" 0
520 de_DE.ISO-8859-1 "ä" "[[:alpha:]]" 0
521 de_DE.ISO-8859-1 "ö" "[[:alpha:]]" 0
522 de_DE.ISO-8859-1 "ü" "[[:alpha:]]" 0
523 de_DE.ISO-8859-1 "A" "[[:alpha:]]" 0
524 de_DE.ISO-8859-1 "Z" "[[:alpha:]]" 0
525 de_DE.ISO-8859-1 "Ä" "[[:alpha:]]" 0
526 de_DE.ISO-8859-1 "Ö" "[[:alpha:]]" 0
527 de_DE.ISO-8859-1 "Ü" "[[:alpha:]]" 0
529 de_DE.ISO-8859-1 "a" "[[=a=]b]" 0
530 de_DE.ISO-8859-1 "â" "[[=a=]b]" 0
531 de_DE.ISO-8859-1 "Ã " "[[=a=]b]" 0
532 de_DE.ISO-8859-1 "á" "[[=a=]b]" 0
533 de_DE.ISO-8859-1 "ä" "[[=a=]b]" 0
534 de_DE.ISO-8859-1 "b" "[[=a=]b]" 0
535 de_DE.ISO-8859-1 "c" "[[=a=]b]" NOMATCH
536 de_DE.ISO-8859-1 "a" "[[=â=]b]" 0
537 de_DE.ISO-8859-1 "â" "[[=â=]b]" 0
538 de_DE.ISO-8859-1 "à " "[[=â=]b]" 0
539 de_DE.ISO-8859-1 "á" "[[=â=]b]" 0
540 de_DE.ISO-8859-1 "ä" "[[=â=]b]" 0
541 de_DE.ISO-8859-1 "b" "[[=â=]b]" 0
542 de_DE.ISO-8859-1 "c" "[[=â=]b]" NOMATCH
543 de_DE.ISO-8859-1 "a" "[[=Ã =]b]" 0
544 de_DE.ISO-8859-1 "â" "[[=à =]b]" 0
545 de_DE.ISO-8859-1 "Ã " "[[=Ã =]b]" 0
546 de_DE.ISO-8859-1 "á" "[[=à =]b]" 0
547 de_DE.ISO-8859-1 "ä" "[[=à =]b]" 0
548 de_DE.ISO-8859-1 "b" "[[=Ã =]b]" 0
549 de_DE.ISO-8859-1 "c" "[[=Ã =]b]" NOMATCH
550 de_DE.ISO-8859-1 "a" "[[=á=]b]" 0
551 de_DE.ISO-8859-1 "â" "[[=á=]b]" 0
552 de_DE.ISO-8859-1 "à " "[[=á=]b]" 0
553 de_DE.ISO-8859-1 "á" "[[=á=]b]" 0
554 de_DE.ISO-8859-1 "ä" "[[=á=]b]" 0
555 de_DE.ISO-8859-1 "b" "[[=á=]b]" 0
556 de_DE.ISO-8859-1 "c" "[[=á=]b]" NOMATCH
557 de_DE.ISO-8859-1 "a" "[[=ä=]b]" 0
558 de_DE.ISO-8859-1 "â" "[[=ä=]b]" 0
559 de_DE.ISO-8859-1 "à " "[[=ä=]b]" 0
560 de_DE.ISO-8859-1 "á" "[[=ä=]b]" 0
561 de_DE.ISO-8859-1 "ä" "[[=ä=]b]" 0
562 de_DE.ISO-8859-1 "b" "[[=ä=]b]" 0
563 de_DE.ISO-8859-1 "c" "[[=ä=]b]" NOMATCH
565 de_DE.ISO-8859-1 "aa" "[[.a.]]a" 0
566 de_DE.ISO-8859-1 "ba" "[[.a.]]a" NOMATCH
569 # And with a multibyte character set.
570 en_US.UTF-8 "a" "[a-z]" 0
571 en_US.UTF-8 "z" "[a-z]" 0
572 en_US.UTF-8 "A" "[a-z]" NOMATCH
573 en_US.UTF-8 "Z" "[a-z]" NOMATCH
574 en_US.UTF-8 "a" "[A-Z]" NOMATCH
575 en_US.UTF-8 "z" "[A-Z]" NOMATCH
576 en_US.UTF-8 "A" "[A-Z]" 0
577 en_US.UTF-8 "Z" "[A-Z]" 0
578 en_US.UTF-8 "0" "[0-9]" 0
579 en_US.UTF-8 "9" "[0-9]" 0
580 de_DE.UTF-8 "a" "[a-z]" 0
581 de_DE.UTF-8 "z" "[a-z]" 0
582 de_DE.UTF-8 "ä" "[a-z]" 0
583 de_DE.UTF-8 "ö" "[a-z]" 0
584 de_DE.UTF-8 "ü" "[a-z]" 0
585 de_DE.UTF-8 "A" "[a-z]" NOMATCH
586 de_DE.UTF-8 "Z" "[a-z]" NOMATCH
587 de_DE.UTF-8 "Ä" "[a-z]" NOMATCH
588 de_DE.UTF-8 "Ö" "[a-z]" NOMATCH
589 de_DE.UTF-8 "Ü" "[a-z]" NOMATCH
590 de_DE.UTF-8 "a" "[A-Z]" NOMATCH
591 de_DE.UTF-8 "z" "[A-Z]" NOMATCH
592 de_DE.UTF-8 "ä" "[A-Z]" NOMATCH
593 de_DE.UTF-8 "ö" "[A-Z]" NOMATCH
594 de_DE.UTF-8 "ü" "[A-Z]" NOMATCH
595 de_DE.UTF-8 "A" "[A-Z]" 0
596 de_DE.UTF-8 "Z" "[A-Z]" 0
597 de_DE.UTF-8 "Ä" "[A-Z]" 0
598 de_DE.UTF-8 "Ö" "[A-Z]" 0
599 de_DE.UTF-8 "Ü" "[A-Z]" 0
600 de_DE.UTF-8 "a" "[[:lower:]]" 0
601 de_DE.UTF-8 "z" "[[:lower:]]" 0
602 de_DE.UTF-8 "ä" "[[:lower:]]" 0
603 de_DE.UTF-8 "ö" "[[:lower:]]" 0
604 de_DE.UTF-8 "ü" "[[:lower:]]" 0
605 de_DE.UTF-8 "A" "[[:lower:]]" NOMATCH
606 de_DE.UTF-8 "Z" "[[:lower:]]" NOMATCH
607 de_DE.UTF-8 "Ä" "[[:lower:]]" NOMATCH
608 de_DE.UTF-8 "Ö" "[[:lower:]]" NOMATCH
609 de_DE.UTF-8 "Ü" "[[:lower:]]" NOMATCH
610 de_DE.UTF-8 "a" "[[:upper:]]" NOMATCH
611 de_DE.UTF-8 "z" "[[:upper:]]" NOMATCH
612 de_DE.UTF-8 "ä" "[[:upper:]]" NOMATCH
613 de_DE.UTF-8 "ö" "[[:upper:]]" NOMATCH
614 de_DE.UTF-8 "ü" "[[:upper:]]" NOMATCH
615 de_DE.UTF-8 "A" "[[:upper:]]" 0
616 de_DE.UTF-8 "Z" "[[:upper:]]" 0
617 de_DE.UTF-8 "Ä" "[[:upper:]]" 0
618 de_DE.UTF-8 "Ö" "[[:upper:]]" 0
619 de_DE.UTF-8 "Ü" "[[:upper:]]" 0
620 de_DE.UTF-8 "a" "[[:alpha:]]" 0
621 de_DE.UTF-8 "z" "[[:alpha:]]" 0
622 de_DE.UTF-8 "ä" "[[:alpha:]]" 0
623 de_DE.UTF-8 "ö" "[[:alpha:]]" 0
624 de_DE.UTF-8 "ü" "[[:alpha:]]" 0
625 de_DE.UTF-8 "A" "[[:alpha:]]" 0
626 de_DE.UTF-8 "Z" "[[:alpha:]]" 0
627 de_DE.UTF-8 "Ä" "[[:alpha:]]" 0
628 de_DE.UTF-8 "Ö" "[[:alpha:]]" 0
629 de_DE.UTF-8 "Ü" "[[:alpha:]]" 0
631 de_DE.UTF-8 "a" "[[=a=]b]" 0
632 de_DE.UTF-8 "â" "[[=a=]b]" 0
633 de_DE.UTF-8 "Ã " "[[=a=]b]" 0
634 de_DE.UTF-8 "á" "[[=a=]b]" 0
635 de_DE.UTF-8 "ä" "[[=a=]b]" 0
636 de_DE.UTF-8 "b" "[[=a=]b]" 0
637 de_DE.UTF-8 "c" "[[=a=]b]" NOMATCH
638 de_DE.UTF-8 "a" "[[=â=]b]" 0
639 de_DE.UTF-8 "â" "[[=â=]b]" 0
640 de_DE.UTF-8 "à " "[[=â=]b]" 0
641 de_DE.UTF-8 "á" "[[=â=]b]" 0
642 de_DE.UTF-8 "ä" "[[=â=]b]" 0
643 de_DE.UTF-8 "b" "[[=â=]b]" 0
644 de_DE.UTF-8 "c" "[[=â=]b]" NOMATCH
645 de_DE.UTF-8 "a" "[[=Ã =]b]" 0
646 de_DE.UTF-8 "â" "[[=à =]b]" 0
647 de_DE.UTF-8 "Ã " "[[=Ã =]b]" 0
648 de_DE.UTF-8 "á" "[[=à =]b]" 0
649 de_DE.UTF-8 "ä" "[[=à =]b]" 0
650 de_DE.UTF-8 "b" "[[=Ã =]b]" 0
651 de_DE.UTF-8 "c" "[[=Ã =]b]" NOMATCH
652 de_DE.UTF-8 "a" "[[=á=]b]" 0
653 de_DE.UTF-8 "â" "[[=á=]b]" 0
654 de_DE.UTF-8 "à " "[[=á=]b]" 0
655 de_DE.UTF-8 "á" "[[=á=]b]" 0
656 de_DE.UTF-8 "ä" "[[=á=]b]" 0
657 de_DE.UTF-8 "b" "[[=á=]b]" 0
658 de_DE.UTF-8 "c" "[[=á=]b]" NOMATCH
659 de_DE.UTF-8 "a" "[[=ä=]b]" 0
660 de_DE.UTF-8 "â" "[[=ä=]b]" 0
661 de_DE.UTF-8 "à " "[[=ä=]b]" 0
662 de_DE.UTF-8 "á" "[[=ä=]b]" 0
663 de_DE.UTF-8 "ä" "[[=ä=]b]" 0
664 de_DE.UTF-8 "b" "[[=ä=]b]" 0
665 de_DE.UTF-8 "c" "[[=ä=]b]" NOMATCH
667 de_DE.UTF-8 "aa" "[[.a.]]a" 0
668 de_DE.UTF-8 "ba" "[[.a.]]a" NOMATCH
671 # Test of GNU extensions.
672 C "x" "x" 0 PATHNAME|LEADING_DIR
673 C "x/y" "x" 0 PATHNAME|LEADING_DIR
674 C "x/y/z" "x" 0 PATHNAME|LEADING_DIR
675 C "x" "*" 0 PATHNAME|LEADING_DIR
676 C "x/y" "*" 0 PATHNAME|LEADING_DIR
677 C "x/y/z" "*" 0 PATHNAME|LEADING_DIR
678 C "x" "*x" 0 PATHNAME|LEADING_DIR
679 C "x/y" "*x" 0 PATHNAME|LEADING_DIR
680 C "x/y/z" "*x" 0 PATHNAME|LEADING_DIR
681 C "x" "x*" 0 PATHNAME|LEADING_DIR
682 C "x/y" "x*" 0 PATHNAME|LEADING_DIR
683 C "x/y/z" "x*" 0 PATHNAME|LEADING_DIR
684 C "x" "a" NOMATCH PATHNAME|LEADING_DIR
685 C "x/y" "a" NOMATCH PATHNAME|LEADING_DIR
686 C "x/y/z" "a" NOMATCH PATHNAME|LEADING_DIR
687 C "x" "x/y" NOMATCH PATHNAME|LEADING_DIR
688 C "x/y" "x/y" 0 PATHNAME|LEADING_DIR
689 C "x/y/z" "x/y" 0 PATHNAME|LEADING_DIR
690 C "x" "x?y" NOMATCH PATHNAME|LEADING_DIR
691 C "x/y" "x?y" NOMATCH PATHNAME|LEADING_DIR
692 C "x/y/z" "x?y" NOMATCH PATHNAME|LEADING_DIR
694 # ksh style matching.
695 C "abcd" "?@(a|b)*@(c)d" 0 EXTMATCH
696 C "/dev/udp/129.22.8.102/45" "/dev/@(tcp|udp)/*/*" 0 PATHNAME|EXTMATCH
697 C "12" "[1-9]*([0-9])" 0 EXTMATCH
698 C "12abc" "[1-9]*([0-9])" NOMATCH EXTMATCH
699 C "1" "[1-9]*([0-9])" 0 EXTMATCH
700 C "07" "+([0-7])" 0 EXTMATCH
701 C "0377" "+([0-7])" 0 EXTMATCH
702 C "09" "+([0-7])" NOMATCH EXTMATCH
703 C "paragraph" "para@(chute|graph)" 0 EXTMATCH
704 C "paramour" "para@(chute|graph)" NOMATCH EXTMATCH
705 C "para991" "para?([345]|99)1" 0 EXTMATCH
706 C "para381" "para?([345]|99)1" NOMATCH EXTMATCH
707 C "paragraph" "para*([0-9])" NOMATCH EXTMATCH
708 C "para" "para*([0-9])" 0 EXTMATCH
709 C "para13829383746592" "para*([0-9])" 0 EXTMATCH
710 C "paragraph" "para+([0-9])" NOMATCH EXTMATCH
711 C "para" "para+([0-9])" NOMATCH EXTMATCH
712 C "para987346523" "para+([0-9])" 0 EXTMATCH
713 C "paragraph" "para!(*.[0-9])" 0 EXTMATCH
714 C "para.38" "para!(*.[0-9])" 0 EXTMATCH
715 C "para.graph" "para!(*.[0-9])" 0 EXTMATCH
716 C "para39" "para!(*.[0-9])" 0 EXTMATCH
717 C "" "*(0|1|3|5|7|9)" 0 EXTMATCH
718 C "137577991" "*(0|1|3|5|7|9)" 0 EXTMATCH
719 C "2468" "*(0|1|3|5|7|9)" NOMATCH EXTMATCH
720 C "1358" "*(0|1|3|5|7|9)" NOMATCH EXTMATCH
721 C "file.c" "*.c?(c)" 0 EXTMATCH
722 C "file.C" "*.c?(c)" NOMATCH EXTMATCH
723 C "file.cc" "*.c?(c)" 0 EXTMATCH
724 C "file.ccc" "*.c?(c)" NOMATCH EXTMATCH
725 C "parse.y" "!(*.c|*.h|Makefile.in|config*|README)" 0 EXTMATCH
726 C "shell.c" "!(*.c|*.h|Makefile.in|config*|README)" NOMATCH EXTMATCH
727 C "Makefile" "!(*.c|*.h|Makefile.in|config*|README)" 0 EXTMATCH
728 C "VMS.FILE;1" "*\;[1-9]*([0-9])" 0 EXTMATCH
729 C "VMS.FILE;0" "*\;[1-9]*([0-9])" NOMATCH EXTMATCH
730 C "VMS.FILE;" "*\;[1-9]*([0-9])" NOMATCH EXTMATCH
731 C "VMS.FILE;139" "*\;[1-9]*([0-9])" 0 EXTMATCH
732 C "VMS.FILE;1N" "*\;[1-9]*([0-9])" NOMATCH EXTMATCH
733 C "abcfefg" "ab**(e|f)" 0 EXTMATCH
734 C "abcfefg" "ab**(e|f)g" 0 EXTMATCH
735 C "ab" "ab*+(e|f)" NOMATCH EXTMATCH
736 C "abef" "ab***ef" 0 EXTMATCH
737 C "abef" "ab**" 0 EXTMATCH
738 C "fofo" "*(f*(o))" 0 EXTMATCH
739 C "ffo" "*(f*(o))" 0 EXTMATCH
740 C "foooofo" "*(f*(o))" 0 EXTMATCH
741 C "foooofof" "*(f*(o))" 0 EXTMATCH
742 C "fooofoofofooo" "*(f*(o))" 0 EXTMATCH
743 C "foooofof" "*(f+(o))" NOMATCH EXTMATCH
744 C "xfoooofof" "*(f*(o))" NOMATCH EXTMATCH
745 C "foooofofx" "*(f*(o))" NOMATCH EXTMATCH
746 C "ofxoofxo" "*(*(of*(o)x)o)" 0 EXTMATCH
747 C "ofooofoofofooo" "*(f*(o))" NOMATCH EXTMATCH
748 C "foooxfooxfoxfooox" "*(f*(o)x)" 0 EXTMATCH
749 C "foooxfooxofoxfooox" "*(f*(o)x)" NOMATCH EXTMATCH
750 C "foooxfooxfxfooox" "*(f*(o)x)" 0 EXTMATCH
751 C "ofxoofxo" "*(*(of*(o)x)o)" 0 EXTMATCH
752 C "ofoooxoofxo" "*(*(of*(o)x)o)" 0 EXTMATCH
753 C "ofoooxoofxoofoooxoofxo" "*(*(of*(o)x)o)" 0 EXTMATCH
754 C "ofoooxoofxoofoooxoofxoo" "*(*(of*(o)x)o)" 0 EXTMATCH
755 C "ofoooxoofxoofoooxoofxofo" "*(*(of*(o)x)o)" NOMATCH EXTMATCH
756 C "ofoooxoofxoofoooxoofxooofxofxo" "*(*(of*(o)x)o)" 0 EXTMATCH
757 C "aac" "*(@(a))a@(c)" 0 EXTMATCH
758 C "ac" "*(@(a))a@(c)" 0 EXTMATCH
759 C "c" "*(@(a))a@(c)" NOMATCH EXTMATCH
760 C "aaac" "*(@(a))a@(c)" 0 EXTMATCH
761 C "baaac" "*(@(a))a@(c)" NOMATCH EXTMATCH
762 C "abcd" "?@(a|b)*@(c)d" 0 EXTMATCH
763 C "abcd" "@(ab|a*@(b))*(c)d" 0 EXTMATCH
764 C "acd" "@(ab|a*(b))*(c)d" 0 EXTMATCH
765 C "abbcd" "@(ab|a*(b))*(c)d" 0 EXTMATCH
766 C "effgz" "@(b+(c)d|e*(f)g?|?(h)i@(j|k))" 0 EXTMATCH
767 C "efgz" "@(b+(c)d|e*(f)g?|?(h)i@(j|k))" 0 EXTMATCH
768 C "egz" "@(b+(c)d|e*(f)g?|?(h)i@(j|k))" 0 EXTMATCH
769 C "egzefffgzbcdij" "*(b+(c)d|e*(f)g?|?(h)i@(j|k))" 0 EXTMATCH
770 C "egz" "@(b+(c)d|e+(f)g?|?(h)i@(j|k))" NOMATCH EXTMATCH
771 C "ofoofo" "*(of+(o))" 0 EXTMATCH
772 C "oxfoxoxfox" "*(oxf+(ox))" 0 EXTMATCH
773 C "oxfoxfox" "*(oxf+(ox))" NOMATCH EXTMATCH
774 C "ofoofo" "*(of+(o)|f)" 0 EXTMATCH
775 C "foofoofo" "@(foo|f|fo)*(f|of+(o))" 0 EXTMATCH
776 C "oofooofo" "*(of|oof+(o))" 0 EXTMATCH
777 C "fffooofoooooffoofffooofff" "*(*(f)*(o))" 0 EXTMATCH
778 C "fofoofoofofoo" "*(fo|foo)" 0 EXTMATCH
779 C "foo" "!(x)" 0 EXTMATCH
780 C "foo" "!(x)*" 0 EXTMATCH
781 C "foo" "!(foo)" NOMATCH EXTMATCH
782 C "foo" "!(foo)*" 0 EXTMATCH
783 C "foobar" "!(foo)" 0 EXTMATCH
784 C "foobar" "!(foo)*" 0 EXTMATCH
785 C "moo.cow" "!(*.*).!(*.*)" 0 EXTMATCH
786 C "mad.moo.cow" "!(*.*).!(*.*)" NOMATCH EXTMATCH
787 C "mucca.pazza" "mu!(*(c))?.pa!(*(z))?" NOMATCH EXTMATCH
788 C "fff" "!(f)" 0 EXTMATCH
789 C "fff" "*(!(f))" 0 EXTMATCH
790 C "fff" "+(!(f))" 0 EXTMATCH
791 C "ooo" "!(f)" 0 EXTMATCH
792 C "ooo" "*(!(f))" 0 EXTMATCH
793 C "ooo" "+(!(f))" 0 EXTMATCH
794 C "foo" "!(f)" 0 EXTMATCH
795 C "foo" "*(!(f))" 0 EXTMATCH
796 C "foo" "+(!(f))" 0 EXTMATCH
797 C "f" "!(f)" NOMATCH EXTMATCH
798 C "f" "*(!(f))" NOMATCH EXTMATCH
799 C "f" "+(!(f))" NOMATCH EXTMATCH
800 C "foot" "@(!(z*)|*x)" 0 EXTMATCH
801 C "zoot" "@(!(z*)|*x)" NOMATCH EXTMATCH
802 C "foox" "@(!(z*)|*x)" 0 EXTMATCH
803 C "zoox" "@(!(z*)|*x)" 0 EXTMATCH
804 C "foo" "*(!(foo)) 0 EXTMATCH
805 C "foob" "!(foo)b*" NOMATCH EXTMATCH
806 C "foobb" "!(foo)b*" 0 EXTMATCH
807 C "[" "*([a[])" 0 EXTMATCH
808 C "]" "*([]a[])" 0 EXTMATCH
809 C "a" "*([]a[])" 0 EXTMATCH
810 C "b" "*([!]a[])" 0 EXTMATCH
811 C "[" "*([!]a[]|[[])" 0 EXTMATCH
812 C "]" "*([!]a[]|[]])" 0 EXTMATCH
813 C "[" "!([!]a[])" 0 EXTMATCH
814 C "]" "!([!]a[])" 0 EXTMATCH
815 C ")" "*([)])" 0 EXTMATCH
816 C "*" "*([*(])" 0 EXTMATCH
817 C "abcd" "*!(|a)cd" 0 EXTMATCH
818 C "ab/.a" "+([abc])/*" NOMATCH EXTMATCH|PATHNAME|PERIOD
821 C "" "*([abc])" 0 EXTMATCH
822 C "" "?([abc])" 0 EXTMATCH