tst-fnmatch.input 28 KB

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