github的一些开源项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

266 lines
12 KiB

  1. # This set of tests is run only with the 8-bit library. They must not require
  2. # UTF-8 or Unicode property support. */
  3. #forbid_utf
  4. #newline_default lf any anycrlf
  5. /ab/
  6. \= Expect error message (too big char) and no match
  7. A\x{123}B
  8. A\o{443}B
  9. /\x{100}/I
  10. /\o{400}/I
  11. / (?: [\040\t] | \(
  12. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  13. \) )* # optional leading comment
  14. (?: (?:
  15. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  16. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  17. |
  18. " (?: # opening quote...
  19. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  20. | # or
  21. \\ [^\x80-\xff] # Escaped something (something != CR)
  22. )* " # closing quote
  23. ) # initial word
  24. (?: (?: [\040\t] | \(
  25. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  26. \) )* \. (?: [\040\t] | \(
  27. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  28. \) )* (?:
  29. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  30. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  31. |
  32. " (?: # opening quote...
  33. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  34. | # or
  35. \\ [^\x80-\xff] # Escaped something (something != CR)
  36. )* " # closing quote
  37. ) )* # further okay, if led by a period
  38. (?: [\040\t] | \(
  39. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  40. \) )* @ (?: [\040\t] | \(
  41. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  42. \) )* (?:
  43. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  44. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  45. | \[ # [
  46. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  47. \] # ]
  48. ) # initial subdomain
  49. (?: #
  50. (?: [\040\t] | \(
  51. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  52. \) )* \. # if led by a period...
  53. (?: [\040\t] | \(
  54. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  55. \) )* (?:
  56. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  57. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  58. | \[ # [
  59. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  60. \] # ]
  61. ) # ...further okay
  62. )*
  63. # address
  64. | # or
  65. (?:
  66. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  67. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  68. |
  69. " (?: # opening quote...
  70. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  71. | # or
  72. \\ [^\x80-\xff] # Escaped something (something != CR)
  73. )* " # closing quote
  74. ) # one word, optionally followed by....
  75. (?:
  76. [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
  77. \(
  78. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  79. \) | # comments, or...
  80. " (?: # opening quote...
  81. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  82. | # or
  83. \\ [^\x80-\xff] # Escaped something (something != CR)
  84. )* " # closing quote
  85. # quoted strings
  86. )*
  87. < (?: [\040\t] | \(
  88. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  89. \) )* # leading <
  90. (?: @ (?: [\040\t] | \(
  91. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  92. \) )* (?:
  93. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  94. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  95. | \[ # [
  96. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  97. \] # ]
  98. ) # initial subdomain
  99. (?: #
  100. (?: [\040\t] | \(
  101. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  102. \) )* \. # if led by a period...
  103. (?: [\040\t] | \(
  104. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  105. \) )* (?:
  106. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  107. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  108. | \[ # [
  109. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  110. \] # ]
  111. ) # ...further okay
  112. )*
  113. (?: (?: [\040\t] | \(
  114. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  115. \) )* , (?: [\040\t] | \(
  116. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  117. \) )* @ (?: [\040\t] | \(
  118. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  119. \) )* (?:
  120. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  121. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  122. | \[ # [
  123. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  124. \] # ]
  125. ) # initial subdomain
  126. (?: #
  127. (?: [\040\t] | \(
  128. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  129. \) )* \. # if led by a period...
  130. (?: [\040\t] | \(
  131. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  132. \) )* (?:
  133. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  134. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  135. | \[ # [
  136. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  137. \] # ]
  138. ) # ...further okay
  139. )*
  140. )* # further okay, if led by comma
  141. : # closing colon
  142. (?: [\040\t] | \(
  143. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  144. \) )* )? # optional route
  145. (?:
  146. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  147. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  148. |
  149. " (?: # opening quote...
  150. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  151. | # or
  152. \\ [^\x80-\xff] # Escaped something (something != CR)
  153. )* " # closing quote
  154. ) # initial word
  155. (?: (?: [\040\t] | \(
  156. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  157. \) )* \. (?: [\040\t] | \(
  158. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  159. \) )* (?:
  160. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  161. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  162. |
  163. " (?: # opening quote...
  164. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  165. | # or
  166. \\ [^\x80-\xff] # Escaped something (something != CR)
  167. )* " # closing quote
  168. ) )* # further okay, if led by a period
  169. (?: [\040\t] | \(
  170. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  171. \) )* @ (?: [\040\t] | \(
  172. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  173. \) )* (?:
  174. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  175. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  176. | \[ # [
  177. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  178. \] # ]
  179. ) # initial subdomain
  180. (?: #
  181. (?: [\040\t] | \(
  182. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  183. \) )* \. # if led by a period...
  184. (?: [\040\t] | \(
  185. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  186. \) )* (?:
  187. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  188. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  189. | \[ # [
  190. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  191. \] # ]
  192. ) # ...further okay
  193. )*
  194. # address spec
  195. (?: [\040\t] | \(
  196. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  197. \) )* > # trailing >
  198. # name and address
  199. ) (?: [\040\t] | \(
  200. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  201. \) )* # optional trailing comment
  202. /Ix
  203. /\h/I
  204. /\H/I
  205. /\v/I
  206. /\V/I
  207. /\R/I
  208. /[\h]/B
  209. >\x09<
  210. /[\h]+/B
  211. >\x09\x20\xa0<
  212. /[\v]/B
  213. /[\H]/B
  214. /[^\h]/B
  215. /[\V]/B
  216. /[\x0a\V]/B
  217. /\777/I
  218. /(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF)XX/mark
  219. XX
  220. /(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF)XX/mark,alt_verbnames
  221. XX
  222. /(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE)XX/mark
  223. XX
  224. /(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE)XX/mark,alt_verbnames
  225. XX
  226. /\u0100/alt_bsux,allow_empty_class,match_unset_backref,dupnames
  227. /[\u0100-\u0200]/alt_bsux,allow_empty_class,match_unset_backref,dupnames
  228. /[^\x00-a]{12,}[^b-\xff]*/B
  229. /[^\s]*\s* [^\W]+\W+ [^\d]*?\d0 [^\d\w]{4,6}?\w*A/B
  230. /(*MARK:a\x{100}b)z/alt_verbnames
  231. /(*:*++++++++++++''''''''''''''''''''+''+++'+++x+++++++++++++++++++++++++++++++++++(++++++++++++++++++++:++++++%++:''''''''''''''''''''''''+++++++++++++++++++++++++++++++++++++++++++++++++++++-++++++++k+++++++''''+++'+++++++++++++++++++++++''''++++++++++++':ƿ)/
  232. /(?i:A{1,}\6666666666)/
  233. A\x{1b6}6666666
  234. # End of testinput9