tst-fnmatch.input 28 KB

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