Update.
[platform/upstream/glibc.git] / posix / tst-fnmatch.input
1 # Tests for fnmatch.
2 # Copyright (C) 2000, 2001 Free Software Foundation, Inc.
3 # This file is part of the GNU C Library.
4 # Contributes by Ulrich Drepper <drepper@redhat.com>.
5 #
6
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.
11
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.
16
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with the GNU C Library; if not, write to the Free
19 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 # 02111-1307 USA.
21
22
23 # Derived from the IEEE 2003.2 text.  The standard only contains some
24 # wording describing the situations to be tested.  It does not specify
25 # any specific tests.  I.e., the tests below are in no case sufficient.
26 # They are hopefully necessary, though.
27
28 # B.6 004(C)
29 C                "!#%+,-./01234567889"  "!#%+,-./01234567889"  0
30 C                ":;=@ABCDEFGHIJKLMNO"  ":;=@ABCDEFGHIJKLMNO"  0
31 C                "PQRSTUVWXYZ]abcdefg"  "PQRSTUVWXYZ]abcdefg"  0
32 C                "hijklmnopqrstuvwxyz"  "hijklmnopqrstuvwxyz"  0
33 C                "^_{}~"                "^_{}~"                0
34
35 # B.6 005(C)
36 C                "\"$&'()"              "\\\"\\$\\&\\'\\(\\)"  0
37 C                "*?[\\`|"              "\\*\\?\\[\\\\\\`\\|"  0
38 C                "<>"                   "\\<\\>"               0
39
40 # B.6 006(C)
41 C                "?*["                  "[?*[][?*[][?*[]"      0
42 C                "a/b"                  "?/b"                  0
43
44 # B.6 007(C)
45 C                "a/b"                  "a?b"                  0
46 C                "a/b"                  "a/?"                  0
47 C                "aa/b"                 "?/b"                  NOMATCH
48 C                "aa/b"                 "a?b"                  NOMATCH
49 C                "a/bb"                 "a/?"                  NOMATCH
50
51 # B.6 009(C)
52 C                "abc"                  "[abc]"                NOMATCH
53 C                "x"                    "[abc]"                NOMATCH
54 C                "a"                    "[abc]"                0
55 C                "["                    "[[abc]"               0
56 C                "a"                    "[][abc]"              0
57 C                "a]"                   "[]a]]"                0
58
59 # B.6 010(C)
60 C                "xyz"                  "[!abc]"               NOMATCH
61 C                "x"                    "[!abc]"               0
62 C                "a"                    "[!abc]"               NOMATCH
63
64 # B.6 011(C)
65 C                "]"                    "[][abc]"              0
66 C                "abc]"                 "[][abc]"              NOMATCH
67 C                "[]abc"                "[][]abc"              NOMATCH
68 C                "]"                    "[!]]"                 NOMATCH
69 C                "aa]"                  "[!]a]"                NOMATCH
70 C                "]"                    "[!a]"                 0
71 C                "]]"                   "[!a]]"                0
72
73 # B.6 012(C)
74 C                "a"                    "[[.a.]]"              0
75 C                "-"                    "[[.-.]]"              0
76 C                "-"                    "[[.-.][.].]]"         0
77 C                "-"                    "[[.].][.-.]]"         0
78 C                "-"                    "[[.-.][=u=]]"         0
79 C                "-"                    "[[.-.][:alpha:]]"     0
80 C                "a"                    "[![.a.]]"             NOMATCH
81
82 # B.6 013(C)
83 C                "a"                    "[[.b.]]"              NOMATCH
84 C                "a"                    "[[.b.][.c.]]"         NOMATCH
85 C                "a"                    "[[.b.][=b=]]"         NOMATCH
86
87
88 # B.6 015(C)
89 C                "a"                    "[[=a=]]"              0
90 C                "b"                    "[[=a=]b]"             0
91 C                "b"                    "[[=a=][=b=]]"         0
92 C                "a"                    "[[=a=][=b=]]"         0
93 C                "a"                    "[[=a=][.b.]]"         0
94 C                "a"                    "[[=a=][:digit:]]"     0
95
96 # B.6 016(C)
97 C                "="                    "[[=a=]b]"             NOMATCH
98 C                "]"                    "[[=a=]b]"             NOMATCH
99 C                "a"                    "[[=b=][=c=]]"         NOMATCH
100 C                "a"                    "[[=b=][.].]]"         NOMATCH
101 C                "a"                    "[[=b=][:digit:]]"     NOMATCH
102
103 # B.6 017(C)
104 C                "a"                    "[[:alnum:]]"          0
105 C                "a"                    "[![:alnum:]]"         NOMATCH
106 C                "-"                    "[[:alnum:]]"          NOMATCH
107 C                "a]a"                  "[[:alnum:]]a"         NOMATCH
108 C                "-"                    "[[:alnum:]-]"         0
109 C                "aa"                   "[[:alnum:]]a"         0
110 C                "-"                    "[![:alnum:]]"         0
111 C                "]"                    "[!][:alnum:]]"        NOMATCH
112 C                "["                    "[![:alnum:][]"        NOMATCH
113 C                "a"                    "[[:alnum:]]"          0
114 C                "b"                    "[[:alnum:]]"          0
115 C                "c"                    "[[:alnum:]]"          0
116 C                "d"                    "[[:alnum:]]"          0
117 C                "e"                    "[[:alnum:]]"          0
118 C                "f"                    "[[:alnum:]]"          0
119 C                "g"                    "[[:alnum:]]"          0
120 C                "h"                    "[[:alnum:]]"          0
121 C                "i"                    "[[:alnum:]]"          0
122 C                "j"                    "[[:alnum:]]"          0
123 C                "k"                    "[[:alnum:]]"          0
124 C                "l"                    "[[:alnum:]]"          0
125 C                "m"                    "[[:alnum:]]"          0
126 C                "n"                    "[[:alnum:]]"          0
127 C                "o"                    "[[:alnum:]]"          0
128 C                "p"                    "[[:alnum:]]"          0
129 C                "q"                    "[[:alnum:]]"          0
130 C                "r"                    "[[:alnum:]]"          0
131 C                "s"                    "[[:alnum:]]"          0
132 C                "t"                    "[[:alnum:]]"          0
133 C                "u"                    "[[:alnum:]]"          0
134 C                "v"                    "[[:alnum:]]"          0
135 C                "w"                    "[[:alnum:]]"          0
136 C                "x"                    "[[:alnum:]]"          0
137 C                "y"                    "[[:alnum:]]"          0
138 C                "z"                    "[[:alnum:]]"          0
139 C                "A"                    "[[:alnum:]]"          0
140 C                "B"                    "[[:alnum:]]"          0
141 C                "C"                    "[[:alnum:]]"          0
142 C                "D"                    "[[:alnum:]]"          0
143 C                "E"                    "[[:alnum:]]"          0
144 C                "F"                    "[[:alnum:]]"          0
145 C                "G"                    "[[:alnum:]]"          0
146 C                "H"                    "[[:alnum:]]"          0
147 C                "I"                    "[[:alnum:]]"          0
148 C                "J"                    "[[:alnum:]]"          0
149 C                "K"                    "[[:alnum:]]"          0
150 C                "L"                    "[[:alnum:]]"          0
151 C                "M"                    "[[:alnum:]]"          0
152 C                "N"                    "[[:alnum:]]"          0
153 C                "O"                    "[[:alnum:]]"          0
154 C                "P"                    "[[:alnum:]]"          0
155 C                "Q"                    "[[:alnum:]]"          0
156 C                "R"                    "[[:alnum:]]"          0
157 C                "S"                    "[[:alnum:]]"          0
158 C                "T"                    "[[:alnum:]]"          0
159 C                "U"                    "[[:alnum:]]"          0
160 C                "V"                    "[[:alnum:]]"          0
161 C                "W"                    "[[:alnum:]]"          0
162 C                "X"                    "[[:alnum:]]"          0
163 C                "Y"                    "[[:alnum:]]"          0
164 C                "Z"                    "[[:alnum:]]"          0
165 C                "0"                    "[[:alnum:]]"          0
166 C                "1"                    "[[:alnum:]]"          0
167 C                "2"                    "[[:alnum:]]"          0
168 C                "3"                    "[[:alnum:]]"          0
169 C                "4"                    "[[:alnum:]]"          0
170 C                "5"                    "[[:alnum:]]"          0
171 C                "6"                    "[[:alnum:]]"          0
172 C                "7"                    "[[:alnum:]]"          0
173 C                "8"                    "[[:alnum:]]"          0
174 C                "9"                    "[[:alnum:]]"          0
175 C                "!"                    "[[:alnum:]]"          NOMATCH
176 C                "#"                    "[[:alnum:]]"          NOMATCH
177 C                "%"                    "[[:alnum:]]"          NOMATCH
178 C                "+"                    "[[:alnum:]]"          NOMATCH
179 C                ","                    "[[:alnum:]]"          NOMATCH
180 C                "-"                    "[[:alnum:]]"          NOMATCH
181 C                "."                    "[[:alnum:]]"          NOMATCH
182 C                "/"                    "[[:alnum:]]"          NOMATCH
183 C                ":"                    "[[:alnum:]]"          NOMATCH
184 C                ";"                    "[[:alnum:]]"          NOMATCH
185 C                "="                    "[[:alnum:]]"          NOMATCH
186 C                "@"                    "[[:alnum:]]"          NOMATCH
187 C                "["                    "[[:alnum:]]"          NOMATCH
188 C                "\\"                   "[[:alnum:]]"          NOMATCH
189 C                "]"                    "[[:alnum:]]"          NOMATCH
190 C                "^"                    "[[:alnum:]]"          NOMATCH
191 C                "_"                    "[[:alnum:]]"          NOMATCH
192 C                "{"                    "[[:alnum:]]"          NOMATCH
193 C                "}"                    "[[:alnum:]]"          NOMATCH
194 C                "~"                    "[[:alnum:]]"          NOMATCH
195 C                "\""                   "[[:alnum:]]"          NOMATCH
196 C                "$"                    "[[:alnum:]]"          NOMATCH
197 C                "&"                    "[[:alnum:]]"          NOMATCH
198 C                "'"                    "[[:alnum:]]"          NOMATCH
199 C                "("                    "[[:alnum:]]"          NOMATCH
200 C                ")"                    "[[:alnum:]]"          NOMATCH
201 C                "*"                    "[[:alnum:]]"          NOMATCH
202 C                "?"                    "[[:alnum:]]"          NOMATCH
203 C                "`"                    "[[:alnum:]]"          NOMATCH
204 C                "|"                    "[[:alnum:]]"          NOMATCH
205 C                "<"                    "[[:alnum:]]"          NOMATCH
206 C                ">"                    "[[:alnum:]]"          NOMATCH
207 C                "\t"                   "[[:cntrl:]]"          0
208 C                "t"                    "[[:cntrl:]]"          NOMATCH
209 C                "t"                    "[[:lower:]]"          0
210 C                "\t"                   "[[:lower:]]"          NOMATCH
211 C                "T"                    "[[:lower:]]"          NOMATCH
212 C                "\t"                   "[[:space:]]"          0
213 C                "t"                    "[[:space:]]"          NOMATCH
214 C                "t"                    "[[:alpha:]]"          0
215 C                "\t"                   "[[:alpha:]]"          NOMATCH
216 C                "0"                    "[[:digit:]]"          0
217 C                "\t"                   "[[:digit:]]"          NOMATCH
218 C                "t"                    "[[:digit:]]"          NOMATCH
219 C                "\t"                   "[[:print:]]"          NOMATCH
220 C                "t"                    "[[:print:]]"          0
221 C                "T"                    "[[:upper:]]"          0
222 C                "\t"                   "[[:upper:]]"          NOMATCH
223 C                "t"                    "[[:upper:]]"          NOMATCH
224 C                "\t"                   "[[:blank:]]"          0
225 C                "t"                    "[[:blank:]]"          NOMATCH
226 C                "\t"                   "[[:graph:]]"          NOMATCH
227 C                "t"                    "[[:graph:]]"          0
228 C                "."                    "[[:punct:]]"          0
229 C                "t"                    "[[:punct:]]"          NOMATCH
230 C                "\t"                   "[[:punct:]]"          NOMATCH
231 C                "0"                    "[[:xdigit:]]"         0
232 C                "\t"                   "[[:xdigit:]]"         NOMATCH
233 C                "a"                    "[[:xdigit:]]"         0
234 C                "A"                    "[[:xdigit:]]"         0
235 C                "t"                    "[[:xdigit:]]"         NOMATCH
236 C                "a"                    "[[alpha]]"            NOMATCH
237 C                "a"                    "[[alpha:]]"           NOMATCH
238 C                "a]"                   "[[alpha]]"            0
239 C                "a]"                   "[[alpha:]]"           0
240 C                "a"                    "[[:alpha:][.b.]]"     0
241 C                "a"                    "[[:alpha:][=b=]]"     0
242 C                "a"                    "[[:alpha:][:digit:]]" 0
243 C                "a"                    "[[:digit:][:alpha:]]" 0
244
245 # B.6 018(C)
246 C                "a"                    "[a-c]"                0
247 C                "b"                    "[a-c]"                0
248 C                "c"                    "[a-c]"                0
249 C                "a"                    "[b-c]"                NOMATCH
250 C                "d"                    "[b-c]"                NOMATCH
251 C                "B"                    "[a-c]"                NOMATCH
252 C                "b"                    "[A-C]"                NOMATCH
253 C                ""                     "[a-c]"                NOMATCH
254 C                "as"                   "[a-ca-z]"             NOMATCH
255 C                "a"                    "[[.a.]-c]"            0
256 C                "a"                    "[a-[.c.]]"            0
257 C                "a"                    "[[.a.]-[.c.]]"        0
258 C                "b"                    "[[.a.]-c]"            0
259 C                "b"                    "[a-[.c.]]"            0
260 C                "b"                    "[[.a.]-[.c.]]"        0
261 C                "c"                    "[[.a.]-c]"            0
262 C                "c"                    "[a-[.c.]]"            0
263 C                "c"                    "[[.a.]-[.c.]]"        0
264 C                "d"                    "[[.a.]-c]"            NOMATCH
265 C                "d"                    "[a-[.c.]]"            NOMATCH
266 C                "d"                    "[[.a.]-[.c.]]"        NOMATCH
267
268 # B.6 019(C)
269 C                "a"                    "[c-a]"                NOMATCH
270 C                "a"                    "[[.c.]-a]"            NOMATCH
271 C                "a"                    "[c-[.a.]]"            NOMATCH
272 C                "a"                    "[[.c.]-[.a.]]"        NOMATCH
273 C                "c"                    "[c-a]"                NOMATCH
274 C                "c"                    "[[.c.]-a]"            NOMATCH
275 C                "c"                    "[c-[.a.]]"            NOMATCH
276 C                "c"                    "[[.c.]-[.a.]]"        NOMATCH
277
278 # B.6 020(C)
279 C                "a"                    "[a-c0-9]"             0
280 C                "d"                    "[a-c0-9]"             NOMATCH
281 C                "B"                    "[a-c0-9]"             NOMATCH
282
283 # B.6 021(C)
284 C                "-"                    "[-a]"                 0
285 C                "a"                    "[-b]"                 NOMATCH
286 C                "-"                    "[!-a]"                NOMATCH
287 C                "a"                    "[!-b]"                0
288 C                "-"                    "[a-c-0-9]"            0
289 C                "b"                    "[a-c-0-9]"            0
290 C                "a:"                   "a[0-9-a]"             NOMATCH
291 C                "a:"                   "a[09-a]"              0
292
293 # B.6 024(C)
294 C                ""                     "*"                    0
295 C                "asd/sdf"              "*"                    0
296
297 # B.6 025(C)
298 C                "as"                   "[a-c][a-z]"           0
299 C                "as"                   "??"                   0
300
301 # B.6 026(C)
302 C                "asd/sdf"              "as*df"                0
303 C                "asd/sdf"              "as*"                  0
304 C                "asd/sdf"              "*df"                  0
305 C                "asd/sdf"              "as*dg"                NOMATCH
306 C                "asdf"                 "as*df"                0
307 C                "asdf"                 "as*df?"               NOMATCH
308 C                "asdf"                 "as*??"                0
309 C                "asdf"                 "a*???"                0
310 C                "asdf"                 "*????"                0
311 C                "asdf"                 "????*"                0
312 C                "asdf"                 "??*?"                 0
313
314 # B.6 027(C)
315 C                "/"                    "/"                    0
316 C                "/"                    "/*"                   0
317 C                "/"                    "*/"                   0
318 C                "/"                    "/?"                   NOMATCH
319 C                "/"                    "?/"                   NOMATCH
320 C                "/"                    "?"                    0
321 C                "."                    "?"                    0
322 C                "/."                   "??"                   0
323 C                "/"                    "[!a-c]"               0
324 C                "."                    "[!a-c]"               0
325
326 # B.6 029(C)
327 C                "/"                    "/"                    0       PATHNAME
328 C                "//"                   "//"                   0       PATHNAME
329 C                "/.a"                  "/*"                   0       PATHNAME
330 C                "/.a"                  "/?a"                  0       PATHNAME
331 C                "/.a"                  "/[!a-z]a"             0       PATHNAME
332 C                "/.a/.b"               "/*/?b"                0       PATHNAME
333
334 # B.6 030(C)
335 C                "/"                    "?"                    NOMATCH PATHNAME
336 C                "/"                    "*"                    NOMATCH PATHNAME
337 C                "a/b"                  "a?b"                  NOMATCH PATHNAME
338 C                "/.a/.b"               "/*b"                  NOMATCH PATHNAME
339
340 # B.6 031(C)
341 C                "/$"                   "\\/\\$"               0
342 C                "/["                   "\\/\\["               0
343 C                "/["                   "\\/["                 NOMATCH
344
345 # B.6 032(C)
346 C                "/$"                   "\\/\\$"               NOMATCH NOESCAPE
347 C                "/\\$"                 "\\/\\$"               NOMATCH NOESCAPE
348 C                "\\/\\$"               "\\/\\$"               0       NOESCAPE
349
350 # B.6 033(C)
351 C                ".asd"                 ".*"                   0       PERIOD
352 C                "/.asd"                "*"                    0       PERIOD
353 C                "/as/.df"              "*/?*f"                0       PERIOD
354 C                "..asd"                ".[!a-z]*"             0       PERIOD
355
356 # B.6 034(C)
357 C                ".asd"                 "*"                    NOMATCH PERIOD
358 C                ".asd"                 "?asd"                 NOMATCH PERIOD
359 C                ".asd"                 "[!a-z]*"              NOMATCH PERIOD
360
361 # B.6 035(C)
362 C                "/."                   "/."                   0       PATHNAME|PERIOD
363 C                "/.a./.b."             "/.*/.*"               0       PATHNAME|PERIOD
364 C                "/.a./.b."             "/.??/.??"             0       PATHNAME|PERIOD
365
366 # B.6 036(C)
367 C                "/."                   "*"                    NOMATCH PATHNAME|PERIOD
368 C                "/."                   "/*"                   NOMATCH PATHNAME|PERIOD
369 C                "/."                   "/?"                   NOMATCH PATHNAME|PERIOD
370 C                "/."                   "/[!a-z]"              NOMATCH PATHNAME|PERIOD
371 C                "/a./.b."              "/*/*"                 NOMATCH PATHNAME|PERIOD
372 C                "/a./.b."              "/??/???"              NOMATCH PATHNAME|PERIOD
373
374 # Some home-grown tests.
375 C               "foobar"                "foo*[abc]z"           NOMATCH
376 C               "foobaz"                "foo*[abc][xyz]"       0
377 C               "foobaz"                "foo?*[abc][xyz]"      0
378 C               "foobaz"                "foo?*[abc][x/yz]"     0
379 C               "foobaz"                "foo?*[abc]/[xyz]"     NOMATCH PATHNAME
380 C               "a"                     "a/"                   NOMATCH PATHNAME
381 C               "a/"                    "a"                    NOMATCH PATHNAME
382 C               "//a"                   "/a"                   NOMATCH PATHNAME
383 C               "/a"                    "//a"                  NOMATCH PATHNAME
384 C               "az"                    "[a-]z"                0
385 C               "bz"                    "[ab-]z"               0
386 C               "cz"                    "[ab-]z"               NOMATCH
387 C               "-z"                    "[ab-]z"               0
388 C               "az"                    "[-a]z"                0
389 C               "bz"                    "[-ab]z"               0
390 C               "cz"                    "[-ab]z"               NOMATCH
391 C               "-z"                    "[-ab]z"               0
392
393 # Following are tests outside the scope of IEEE 2003.2 since they are using
394 # locales other than the C locale.  The main focus of the tests is on the
395 # handling of ranges and the recognition of character (vs bytes).
396 de_DE.ISO-8859-1 "a"                    "[a-z]"                0
397 de_DE.ISO-8859-1 "z"                    "[a-z]"                0
398 de_DE.ISO-8859-1 "ä"                    "[a-z]"                0
399 de_DE.ISO-8859-1 "ö"                    "[a-z]"                0
400 de_DE.ISO-8859-1 "ü"                    "[a-z]"                0
401 de_DE.ISO-8859-1 "A"                    "[a-z]"                NOMATCH
402 de_DE.ISO-8859-1 "Z"                    "[a-z]"                NOMATCH
403 de_DE.ISO-8859-1 "Ä"                    "[a-z]"                NOMATCH
404 de_DE.ISO-8859-1 "Ö"                    "[a-z]"                NOMATCH
405 de_DE.ISO-8859-1 "Ãœ"                    "[a-z]"                NOMATCH
406 de_DE.ISO-8859-1 "a"                    "[A-Z]"                NOMATCH
407 de_DE.ISO-8859-1 "z"                    "[A-Z]"                NOMATCH
408 de_DE.ISO-8859-1 "ä"                    "[A-Z]"                NOMATCH
409 de_DE.ISO-8859-1 "ö"                    "[A-Z]"                NOMATCH
410 de_DE.ISO-8859-1 "ü"                    "[A-Z]"                NOMATCH
411 de_DE.ISO-8859-1 "A"                    "[A-Z]"                0
412 de_DE.ISO-8859-1 "Z"                    "[A-Z]"                0
413 de_DE.ISO-8859-1 "Ä"                    "[A-Z]"                0
414 de_DE.ISO-8859-1 "Ö"                    "[A-Z]"                0
415 de_DE.ISO-8859-1 "Ãœ"                    "[A-Z]"                0
416 de_DE.ISO-8859-1 "a"                    "[[:lower:]]"          0
417 de_DE.ISO-8859-1 "z"                    "[[:lower:]]"          0
418 de_DE.ISO-8859-1 "ä"                    "[[:lower:]]"          0
419 de_DE.ISO-8859-1 "ö"                    "[[:lower:]]"          0
420 de_DE.ISO-8859-1 "ü"                    "[[:lower:]]"          0
421 de_DE.ISO-8859-1 "A"                    "[[:lower:]]"          NOMATCH
422 de_DE.ISO-8859-1 "Z"                    "[[:lower:]]"          NOMATCH
423 de_DE.ISO-8859-1 "Ä"                    "[[:lower:]]"          NOMATCH
424 de_DE.ISO-8859-1 "Ö"                    "[[:lower:]]"          NOMATCH
425 de_DE.ISO-8859-1 "Ãœ"                    "[[:lower:]]"          NOMATCH
426 de_DE.ISO-8859-1 "a"                    "[[:upper:]]"          NOMATCH
427 de_DE.ISO-8859-1 "z"                    "[[:upper:]]"          NOMATCH
428 de_DE.ISO-8859-1 "ä"                    "[[:upper:]]"          NOMATCH
429 de_DE.ISO-8859-1 "ö"                    "[[:upper:]]"          NOMATCH
430 de_DE.ISO-8859-1 "ü"                    "[[:upper:]]"          NOMATCH
431 de_DE.ISO-8859-1 "A"                    "[[:upper:]]"          0
432 de_DE.ISO-8859-1 "Z"                    "[[:upper:]]"          0
433 de_DE.ISO-8859-1 "Ä"                    "[[:upper:]]"          0
434 de_DE.ISO-8859-1 "Ö"                    "[[:upper:]]"          0
435 de_DE.ISO-8859-1 "Ãœ"                    "[[:upper:]]"          0
436 de_DE.ISO-8859-1 "a"                    "[[:alpha:]]"          0
437 de_DE.ISO-8859-1 "z"                    "[[:alpha:]]"          0
438 de_DE.ISO-8859-1 "ä"                    "[[:alpha:]]"          0
439 de_DE.ISO-8859-1 "ö"                    "[[:alpha:]]"          0
440 de_DE.ISO-8859-1 "ü"                    "[[:alpha:]]"          0
441 de_DE.ISO-8859-1 "A"                    "[[:alpha:]]"          0
442 de_DE.ISO-8859-1 "Z"                    "[[:alpha:]]"          0
443 de_DE.ISO-8859-1 "Ä"                    "[[:alpha:]]"          0
444 de_DE.ISO-8859-1 "Ö"                    "[[:alpha:]]"          0
445 de_DE.ISO-8859-1 "Ãœ"                    "[[:alpha:]]"          0
446
447 de_DE.ISO-8859-1 "a"                    "[[=a=]b]"             0
448 de_DE.ISO-8859-1 "â"                    "[[=a=]b]"             0
449 de_DE.ISO-8859-1 "à"                    "[[=a=]b]"             0
450 de_DE.ISO-8859-1 "á"                    "[[=a=]b]"             0
451 de_DE.ISO-8859-1 "ä"                    "[[=a=]b]"             0
452 de_DE.ISO-8859-1 "b"                    "[[=a=]b]"             0
453 de_DE.ISO-8859-1 "c"                    "[[=a=]b]"             NOMATCH
454 de_DE.ISO-8859-1 "a"                    "[[=â=]b]"             0
455 de_DE.ISO-8859-1 "â"                    "[[=â=]b]"             0
456 de_DE.ISO-8859-1 "à"                    "[[=â=]b]"             0
457 de_DE.ISO-8859-1 "á"                    "[[=â=]b]"             0
458 de_DE.ISO-8859-1 "ä"                    "[[=â=]b]"             0
459 de_DE.ISO-8859-1 "b"                    "[[=â=]b]"             0
460 de_DE.ISO-8859-1 "c"                    "[[=â=]b]"             NOMATCH
461 de_DE.ISO-8859-1 "a"                    "[[=à=]b]"             0
462 de_DE.ISO-8859-1 "â"                    "[[=à=]b]"             0
463 de_DE.ISO-8859-1 "à"                    "[[=à=]b]"             0
464 de_DE.ISO-8859-1 "á"                    "[[=à=]b]"             0
465 de_DE.ISO-8859-1 "ä"                    "[[=à=]b]"             0
466 de_DE.ISO-8859-1 "b"                    "[[=à=]b]"             0
467 de_DE.ISO-8859-1 "c"                    "[[=à=]b]"             NOMATCH
468 de_DE.ISO-8859-1 "a"                    "[[=á=]b]"             0
469 de_DE.ISO-8859-1 "â"                    "[[=á=]b]"             0
470 de_DE.ISO-8859-1 "à"                    "[[=á=]b]"             0
471 de_DE.ISO-8859-1 "á"                    "[[=á=]b]"             0
472 de_DE.ISO-8859-1 "ä"                    "[[=á=]b]"             0
473 de_DE.ISO-8859-1 "b"                    "[[=á=]b]"             0
474 de_DE.ISO-8859-1 "c"                    "[[=á=]b]"             NOMATCH
475 de_DE.ISO-8859-1 "a"                    "[[=ä=]b]"             0
476 de_DE.ISO-8859-1 "â"                    "[[=ä=]b]"             0
477 de_DE.ISO-8859-1 "à"                    "[[=ä=]b]"             0
478 de_DE.ISO-8859-1 "á"                    "[[=ä=]b]"             0
479 de_DE.ISO-8859-1 "ä"                    "[[=ä=]b]"             0
480 de_DE.ISO-8859-1 "b"                    "[[=ä=]b]"             0
481 de_DE.ISO-8859-1 "c"                    "[[=ä=]b]"             NOMATCH
482
483 de_DE.ISO-8859-1 "aa"                   "[[.a.]]a"             0
484 de_DE.ISO-8859-1 "ba"                   "[[.a.]]a"             NOMATCH
485
486
487 # And with a multibyte character set.
488 de_DE.UTF-8      "a"                    "[a-z]"                0
489 de_DE.UTF-8      "z"                    "[a-z]"                0
490 de_DE.UTF-8      "ä"                   "[a-z]"                0
491 de_DE.UTF-8      "ö"                   "[a-z]"                0
492 de_DE.UTF-8      "ü"                   "[a-z]"                0
493 de_DE.UTF-8      "A"                    "[a-z]"                NOMATCH
494 de_DE.UTF-8      "Z"                    "[a-z]"                NOMATCH
495 de_DE.UTF-8      "Ä"                   "[a-z]"                NOMATCH
496 de_DE.UTF-8      "Ö"                   "[a-z]"                NOMATCH
497 de_DE.UTF-8      "Ãœ"                   "[a-z]"                NOMATCH
498 de_DE.UTF-8      "a"                    "[A-Z]"                NOMATCH
499 de_DE.UTF-8      "z"                    "[A-Z]"                NOMATCH
500 de_DE.UTF-8      "ä"                   "[A-Z]"                NOMATCH
501 de_DE.UTF-8      "ö"                   "[A-Z]"                NOMATCH
502 de_DE.UTF-8      "ü"                   "[A-Z]"                NOMATCH
503 de_DE.UTF-8      "A"                    "[A-Z]"                0
504 de_DE.UTF-8      "Z"                    "[A-Z]"                0
505 de_DE.UTF-8      "Ä"                   "[A-Z]"                0
506 de_DE.UTF-8      "Ö"                   "[A-Z]"                0
507 de_DE.UTF-8      "Ãœ"                   "[A-Z]"                0
508 de_DE.UTF-8      "a"                    "[[:lower:]]"          0
509 de_DE.UTF-8      "z"                    "[[:lower:]]"          0
510 de_DE.UTF-8      "ä"                   "[[:lower:]]"          0
511 de_DE.UTF-8      "ö"                   "[[:lower:]]"          0
512 de_DE.UTF-8      "ü"                   "[[:lower:]]"          0
513 de_DE.UTF-8      "A"                    "[[:lower:]]"          NOMATCH
514 de_DE.UTF-8      "Z"                    "[[:lower:]]"          NOMATCH
515 de_DE.UTF-8      "Ä"                   "[[:lower:]]"          NOMATCH
516 de_DE.UTF-8      "Ö"                   "[[:lower:]]"          NOMATCH
517 de_DE.UTF-8      "Ãœ"                   "[[:lower:]]"          NOMATCH
518 de_DE.UTF-8      "a"                    "[[:upper:]]"          NOMATCH
519 de_DE.UTF-8      "z"                    "[[:upper:]]"          NOMATCH
520 de_DE.UTF-8      "ä"                   "[[:upper:]]"          NOMATCH
521 de_DE.UTF-8      "ö"                   "[[:upper:]]"          NOMATCH
522 de_DE.UTF-8      "ü"                   "[[:upper:]]"          NOMATCH
523 de_DE.UTF-8      "A"                    "[[:upper:]]"          0
524 de_DE.UTF-8      "Z"                    "[[:upper:]]"          0
525 de_DE.UTF-8      "Ä"                   "[[:upper:]]"          0
526 de_DE.UTF-8      "Ö"                   "[[:upper:]]"          0
527 de_DE.UTF-8      "Ãœ"                   "[[:upper:]]"          0
528 de_DE.UTF-8      "a"                    "[[:alpha:]]"          0
529 de_DE.UTF-8      "z"                    "[[:alpha:]]"          0
530 de_DE.UTF-8      "ä"                   "[[:alpha:]]"          0
531 de_DE.UTF-8      "ö"                   "[[:alpha:]]"          0
532 de_DE.UTF-8      "ü"                   "[[:alpha:]]"          0
533 de_DE.UTF-8      "A"                    "[[:alpha:]]"          0
534 de_DE.UTF-8      "Z"                    "[[:alpha:]]"          0
535 de_DE.UTF-8      "Ä"                   "[[:alpha:]]"          0
536 de_DE.UTF-8      "Ö"                   "[[:alpha:]]"          0
537 de_DE.UTF-8      "Ãœ"                   "[[:alpha:]]"          0
538
539 de_DE.UTF-8      "a"                    "[[=a=]b]"             0
540 de_DE.UTF-8      "â"                   "[[=a=]b]"             0
541 de_DE.UTF-8      "à"                   "[[=a=]b]"             0
542 de_DE.UTF-8      "á"                   "[[=a=]b]"             0
543 de_DE.UTF-8      "ä"                   "[[=a=]b]"             0
544 de_DE.UTF-8      "b"                    "[[=a=]b]"             0
545 de_DE.UTF-8      "c"                    "[[=a=]b]"             NOMATCH
546 de_DE.UTF-8      "a"                    "[[=â=]b]"            0
547 de_DE.UTF-8      "â"                   "[[=â=]b]"            0
548 de_DE.UTF-8      "à"                   "[[=â=]b]"            0
549 de_DE.UTF-8      "á"                   "[[=â=]b]"            0
550 de_DE.UTF-8      "ä"                   "[[=â=]b]"            0
551 de_DE.UTF-8      "b"                    "[[=â=]b]"            0
552 de_DE.UTF-8      "c"                    "[[=â=]b]"            NOMATCH
553 de_DE.UTF-8      "a"                    "[[=à=]b]"            0
554 de_DE.UTF-8      "â"                   "[[=à=]b]"            0
555 de_DE.UTF-8      "à"                   "[[=à=]b]"            0
556 de_DE.UTF-8      "á"                   "[[=à=]b]"            0
557 de_DE.UTF-8      "ä"                   "[[=à=]b]"            0
558 de_DE.UTF-8      "b"                    "[[=à=]b]"            0
559 de_DE.UTF-8      "c"                    "[[=à=]b]"            NOMATCH
560 de_DE.UTF-8      "a"                    "[[=á=]b]"            0
561 de_DE.UTF-8      "â"                   "[[=á=]b]"            0
562 de_DE.UTF-8      "à"                   "[[=á=]b]"            0
563 de_DE.UTF-8      "á"                   "[[=á=]b]"            0
564 de_DE.UTF-8      "ä"                   "[[=á=]b]"            0
565 de_DE.UTF-8      "b"                    "[[=á=]b]"            0
566 de_DE.UTF-8      "c"                    "[[=á=]b]"            NOMATCH
567 de_DE.UTF-8      "a"                    "[[=ä=]b]"            0
568 de_DE.UTF-8      "â"                   "[[=ä=]b]"            0
569 de_DE.UTF-8      "à"                   "[[=ä=]b]"            0
570 de_DE.UTF-8      "á"                   "[[=ä=]b]"            0
571 de_DE.UTF-8      "ä"                   "[[=ä=]b]"            0
572 de_DE.UTF-8      "b"                    "[[=ä=]b]"            0
573 de_DE.UTF-8      "c"                    "[[=ä=]b]"            NOMATCH
574
575 de_DE.UTF-8      "aa"                   "[[.a.]]a"             0
576 de_DE.UTF-8      "ba"                   "[[.a.]]a"             NOMATCH
577
578
579 # Test of GNU extensions.
580 C                "x"                    "x"                    0       PATHNAME|LEADING_DIR
581 C                "x/y"                  "x"                    0       PATHNAME|LEADING_DIR
582 C                "x/y/z"                "x"                    0       PATHNAME|LEADING_DIR
583 C                "x"                    "*"                    0       PATHNAME|LEADING_DIR
584 C                "x/y"                  "*"                    0       PATHNAME|LEADING_DIR
585 C                "x/y/z"                "*"                    0       PATHNAME|LEADING_DIR
586 C                "x"                    "*x"                   0       PATHNAME|LEADING_DIR
587 C                "x/y"                  "*x"                   0       PATHNAME|LEADING_DIR
588 C                "x/y/z"                "*x"                   0       PATHNAME|LEADING_DIR
589 C                "x"                    "x*"                   0       PATHNAME|LEADING_DIR
590 C                "x/y"                  "x*"                   0       PATHNAME|LEADING_DIR
591 C                "x/y/z"                "x*"                   0       PATHNAME|LEADING_DIR
592 C                "x"                    "a"                    NOMATCH PATHNAME|LEADING_DIR
593 C                "x/y"                  "a"                    NOMATCH PATHNAME|LEADING_DIR
594 C                "x/y/z"                "a"                    NOMATCH PATHNAME|LEADING_DIR
595 C                "x"                    "x/y"                  NOMATCH PATHNAME|LEADING_DIR
596 C                "x/y"                  "x/y"                  0       PATHNAME|LEADING_DIR
597 C                "x/y/z"                "x/y"                  0       PATHNAME|LEADING_DIR
598 C                "x"                    "x?y"                  NOMATCH PATHNAME|LEADING_DIR
599 C                "x/y"                  "x?y"                  NOMATCH PATHNAME|LEADING_DIR
600 C                "x/y/z"                "x?y"                  NOMATCH PATHNAME|LEADING_DIR
601
602 # ksh style matching.
603 C               "abcd"                  "?@(a|b)*@(c)d"        0       EXTMATCH
604 C               "/dev/udp/129.22.8.102/45" "/dev/@(tcp|udp)/*/*" 0     PATHNAME|EXTMATCH
605 C               "12"                    "[1-9]*([0-9])"        0       EXTMATCH
606 C               "12abc"                 "[1-9]*([0-9])"        NOMATCH EXTMATCH
607 C               "1"                     "[1-9]*([0-9])"        0       EXTMATCH
608 C               "07"                    "+([0-7])"             0       EXTMATCH
609 C               "0377"                  "+([0-7])"             0       EXTMATCH
610 C               "09"                    "+([0-7])"             NOMATCH EXTMATCH
611 C               "paragraph"             "para@(chute|graph)"   0       EXTMATCH
612 C               "paramour"              "para@(chute|graph)"   NOMATCH EXTMATCH
613 C               "para991"               "para?([345]|99)1"     0       EXTMATCH
614 C               "para381"               "para?([345]|99)1"     NOMATCH EXTMATCH
615 C               "paragraph"             "para*([0-9])"         NOMATCH EXTMATCH
616 C               "para"                  "para*([0-9])"         0       EXTMATCH
617 C               "para13829383746592"    "para*([0-9])"         0       EXTMATCH
618 C               "paragraph"             "para+([0-9])"         NOMATCH EXTMATCH
619 C               "para"                  "para+([0-9])"         NOMATCH EXTMATCH
620 C               "para987346523"         "para+([0-9])"         0       EXTMATCH
621 C               "paragraph"             "para!(*.[0-9])"       0       EXTMATCH
622 C               "para.38"               "para!(*.[0-9])"       0       EXTMATCH
623 C               "para.graph"            "para!(*.[0-9])"       0       EXTMATCH
624 C               "para39"                "para!(*.[0-9])"       0       EXTMATCH
625 C               ""                      "*(0|1|3|5|7|9)"       0       EXTMATCH
626 C               "137577991"             "*(0|1|3|5|7|9)"       0       EXTMATCH
627 C               "2468"                  "*(0|1|3|5|7|9)"       NOMATCH EXTMATCH
628 C               "1358"                  "*(0|1|3|5|7|9)"       NOMATCH EXTMATCH
629 C               "file.c"                "*.c?(c)"              0       EXTMATCH
630 C               "file.C"                "*.c?(c)"              NOMATCH EXTMATCH
631 C               "file.cc"               "*.c?(c)"              0       EXTMATCH
632 C               "file.ccc"              "*.c?(c)"              NOMATCH EXTMATCH
633 C               "parse.y"               "!(*.c|*.h|Makefile.in|config*|README)" 0 EXTMATCH
634 C               "shell.c"               "!(*.c|*.h|Makefile.in|config*|README)" NOMATCH EXTMATCH
635 C               "Makefile"              "!(*.c|*.h|Makefile.in|config*|README)" 0 EXTMATCH
636 C               "VMS.FILE;1"            "*\;[1-9]*([0-9])"     0       EXTMATCH
637 C               "VMS.FILE;0"            "*\;[1-9]*([0-9])"     NOMATCH EXTMATCH
638 C               "VMS.FILE;"             "*\;[1-9]*([0-9])"     NOMATCH EXTMATCH
639 C               "VMS.FILE;139"          "*\;[1-9]*([0-9])"     0       EXTMATCH
640 C               "VMS.FILE;1N"           "*\;[1-9]*([0-9])"     NOMATCH EXTMATCH
641 C               "abcfefg"               "ab**(e|f)"            0       EXTMATCH
642 C               "abcfefg"               "ab**(e|f)g"           0       EXTMATCH
643 C               "ab"                    "ab*+(e|f)"            NOMATCH EXTMATCH
644 C               "abef"                  "ab***ef"              0       EXTMATCH
645 C               "abef"                  "ab**"                 0       EXTMATCH
646 C               "fofo"                  "*(f*(o))"             0       EXTMATCH
647 C               "ffo"                   "*(f*(o))"             0       EXTMATCH
648 C               "foooofo"               "*(f*(o))"             0       EXTMATCH
649 C               "foooofof"              "*(f*(o))"             0       EXTMATCH
650 C               "fooofoofofooo"         "*(f*(o))"             0       EXTMATCH
651 C               "foooofof"              "*(f+(o))"             NOMATCH EXTMATCH
652 C               "xfoooofof"             "*(f*(o))"             NOMATCH EXTMATCH
653 C               "foooofofx"             "*(f*(o))"             NOMATCH EXTMATCH
654 C               "ofxoofxo"              "*(*(of*(o)x)o)"       0       EXTMATCH
655 C               "ofooofoofofooo"        "*(f*(o))"             NOMATCH EXTMATCH
656 C               "foooxfooxfoxfooox"     "*(f*(o)x)"            0       EXTMATCH
657 C               "foooxfooxofoxfooox"    "*(f*(o)x)"            NOMATCH EXTMATCH
658 C               "foooxfooxfxfooox"      "*(f*(o)x)"            0       EXTMATCH
659 C               "ofxoofxo"              "*(*(of*(o)x)o)"       0       EXTMATCH
660 C               "ofoooxoofxo"           "*(*(of*(o)x)o)"       0       EXTMATCH
661 C               "ofoooxoofxoofoooxoofxo" "*(*(of*(o)x)o)"      0       EXTMATCH
662 C               "ofoooxoofxoofoooxoofxoo" "*(*(of*(o)x)o)"     0       EXTMATCH
663 C               "ofoooxoofxoofoooxoofxofo" "*(*(of*(o)x)o)"    NOMATCH EXTMATCH
664 C               "ofoooxoofxoofoooxoofxooofxofxo" "*(*(of*(o)x)o)" 0    EXTMATCH
665 C               "aac"                   "*(@(a))a@(c)"         0       EXTMATCH
666 C               "ac"                    "*(@(a))a@(c)"         0       EXTMATCH
667 C               "c"                     "*(@(a))a@(c)"         NOMATCH EXTMATCH
668 C               "aaac"                  "*(@(a))a@(c)"         0       EXTMATCH
669 C               "baaac"                 "*(@(a))a@(c)"         NOMATCH EXTMATCH
670 C               "abcd"                  "?@(a|b)*@(c)d"        0       EXTMATCH
671 C               "abcd"                  "@(ab|a*@(b))*(c)d"    0       EXTMATCH
672 C               "acd"                   "@(ab|a*(b))*(c)d"     0       EXTMATCH
673 C               "abbcd"                 "@(ab|a*(b))*(c)d"     0       EXTMATCH
674 C               "effgz"                 "@(b+(c)d|e*(f)g?|?(h)i@(j|k))" 0 EXTMATCH
675 C               "efgz"                  "@(b+(c)d|e*(f)g?|?(h)i@(j|k))" 0 EXTMATCH
676 C               "egz"                   "@(b+(c)d|e*(f)g?|?(h)i@(j|k))" 0 EXTMATCH
677 C               "egzefffgzbcdij"        "*(b+(c)d|e*(f)g?|?(h)i@(j|k))" 0 EXTMATCH
678 C               "egz"                   "@(b+(c)d|e+(f)g?|?(h)i@(j|k))" NOMATCH EXTMATCH
679 C               "ofoofo"                "*(of+(o))"            0       EXTMATCH
680 C               "oxfoxoxfox"            "*(oxf+(ox))"          0       EXTMATCH
681 C               "oxfoxfox"              "*(oxf+(ox))"          NOMATCH EXTMATCH
682 C               "ofoofo"                "*(of+(o)|f)"          0       EXTMATCH
683 C               "foofoofo"              "@(foo|f|fo)*(f|of+(o))" 0     EXTMATCH
684 C               "oofooofo"              "*(of|oof+(o))"        0       EXTMATCH
685 C               "fffooofoooooffoofffooofff" "*(*(f)*(o))"      0       EXTMATCH
686 C               "fofoofoofofoo"         "*(fo|foo)"            0       EXTMATCH
687 C               "foo"                   "!(x)"                 0       EXTMATCH
688 C               "foo"                   "!(x)*"                0       EXTMATCH
689 C               "foo"                   "!(foo)"               NOMATCH EXTMATCH
690 C               "foo"                   "!(foo)*"              0       EXTMATCH
691 C               "foobar"                "!(foo)"               0       EXTMATCH
692 C               "foobar"                "!(foo)*"              0       EXTMATCH
693 C               "moo.cow"               "!(*.*).!(*.*)"        0       EXTMATCH
694 C               "mad.moo.cow"           "!(*.*).!(*.*)"        NOMATCH EXTMATCH
695 C               "mucca.pazza"           "mu!(*(c))?.pa!(*(z))?" NOMATCH EXTMATCH
696 C               "fff"                   "!(f)"                 0       EXTMATCH
697 C               "fff"                   "*(!(f))"              0       EXTMATCH
698 C               "fff"                   "+(!(f))"              0       EXTMATCH
699 C               "ooo"                   "!(f)"                 0       EXTMATCH
700 C               "ooo"                   "*(!(f))"              0       EXTMATCH
701 C               "ooo"                   "+(!(f))"              0       EXTMATCH
702 C               "foo"                   "!(f)"                 0       EXTMATCH
703 C               "foo"                   "*(!(f))"              0       EXTMATCH
704 C               "foo"                   "+(!(f))"              0       EXTMATCH
705 C               "f"                     "!(f)"                 NOMATCH EXTMATCH
706 C               "f"                     "*(!(f))"              NOMATCH EXTMATCH
707 C               "f"                     "+(!(f))"              NOMATCH EXTMATCH
708 C               "foot"                  "@(!(z*)|*x)"          0       EXTMATCH
709 C               "zoot"                  "@(!(z*)|*x)"          NOMATCH EXTMATCH
710 C               "foox"                  "@(!(z*)|*x)"          0       EXTMATCH
711 C               "zoox"                  "@(!(z*)|*x)"          0       EXTMATCH
712 C               "foo"                   "*(!(foo))             0       EXTMATCH
713 C               "foob"                  "!(foo)b*"             NOMATCH EXTMATCH
714 C               "foobb"                 "!(foo)b*"             0       EXTMATCH
715 C               "["                     "*([a[])"              0       EXTMATCH
716 C               "]"                     "*([]a[])"             0       EXTMATCH
717 C               "a"                     "*([]a[])"             0       EXTMATCH
718 C               "b"                     "*([!]a[])"            0       EXTMATCH
719 C               "["                     "*([!]a[]|[[])"        0       EXTMATCH
720 C               "]"                     "*([!]a[]|[]])"        0       EXTMATCH
721 C               "["                     "!([!]a[])"            0       EXTMATCH
722 C               "]"                     "!([!]a[])"            0       EXTMATCH
723 C               ")"                     "*([)])"               0       EXTMATCH
724 C               "*"                     "*([*(])"              0       EXTMATCH
725 C               "abcd"                  "*!(|a)cd"             0       EXTMATCH
726 C               "ab/.a"                 "+([abc])/*"           NOMATCH EXTMATCH|PATHNAME|PERIOD
727 C               ""                      ""                     0
728 C               ""                      ""                     0       EXTMATCH
729 C               ""                      "*([abc])"             0       EXTMATCH
730 C               ""                      "?([abc])"             0       EXTMATCH