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.

189 lines
7.1 KiB

  1. # There are two sorts of patterns in this test. A number of them are
  2. # representative patterns whose lengths and offsets are checked. This is just a
  3. # doublecheck test to ensure the sizes don't go horribly wrong when something
  4. # is changed. The operation of these patterns is checked in other tests.
  5. #
  6. # This file also contains tests whose output varies with code unit size and/or
  7. # link size. Unicode support is required for these tests. There are separate
  8. # output files for each code unit size and link size.
  9. #pattern fullbincode,memory
  10. /((?i)b)/
  11. /(?s)(.*X|^B)/
  12. /(?s:.*X|^B)/
  13. /^[[:alnum:]]/
  14. /#/Ix
  15. /a#/Ix
  16. /x?+/
  17. /x++/
  18. /x{1,3}+/
  19. /(x)*+/
  20. /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
  21. "8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b"
  22. "\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b"
  23. /(a(?1)b)/
  24. /(a(?1)+b)/
  25. /a(?P<name1>b|c)d(?P<longername2>e)/
  26. /(?:a(?P<c>c(?P<d>d)))(?P<a>a)/
  27. /(?P<a>a)...(?P=a)bbb(?P>a)d/
  28. /abc(?C255)de(?C)f/
  29. /abcde/auto_callout
  30. /\x{100}/utf
  31. /\x{1000}/utf
  32. /\x{10000}/utf
  33. /\x{100000}/utf
  34. /\x{10ffff}/utf
  35. /\x{110000}/utf
  36. /[\x{ff}]/utf
  37. /[\x{100}]/utf
  38. /\x80/utf
  39. /\xff/utf
  40. /\x{0041}\x{2262}\x{0391}\x{002e}/I,utf
  41. /\x{D55c}\x{ad6d}\x{C5B4}/I,utf
  42. /\x{65e5}\x{672c}\x{8a9e}/I,utf
  43. /[\x{100}]/utf
  44. /[Z\x{100}]/utf
  45. /^[\x{100}\E-\Q\E\x{150}]/utf
  46. /^[\QĀ\E-\QŐ\E]/utf
  47. /^[\QĀ\E-\QŐ\E/utf
  48. /[\p{L}]/
  49. /[\p{^L}]/
  50. /[\P{L}]/
  51. /[\P{^L}]/
  52. /[abc\p{L}\x{0660}]/utf
  53. /[\p{Nd}]/utf
  54. /[\p{Nd}+-]+/utf
  55. /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf
  56. /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf
  57. /[\x{105}-\x{109}]/i,utf
  58. /( ( (?(1)0|) )* )/x
  59. /( (?(1)0|)* )/x
  60. /[a]/
  61. /[a]/utf
  62. /[\xaa]/
  63. /[\xaa]/utf
  64. /[^a]/
  65. /[^a]/utf
  66. /[^\xaa]/
  67. /[^\xaa]/utf
  68. #pattern -memory
  69. /[^\d]/utf,ucp
  70. /[[:^alpha:][:^cntrl:]]+/utf,ucp
  71. /[[:^cntrl:][:^alpha:]]+/utf,ucp
  72. /[[:alpha:]]+/utf,ucp
  73. /[[:^alpha:]\S]+/utf,ucp
  74. /abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/
  75. /(((a\2)|(a*)\g<-1>))*a?/
  76. /((?+1)(\1))/
  77. "(?1)(?#?'){2}(a)"
  78. /.((?2)(?R)|\1|$)()/
  79. /.((?3)(?R)()(?2)|\1|$)()/
  80. /(?1)()((((((\1++))\x85)+)|))/
  81. # Check the absolute limit on nesting (?| etc. This varies with code unit
  82. # width because the workspace is a different number of bytes. It will fail
  83. # with link size 2 in 8-bit and 16-bit but not in 32-bit.
  84. /(?|(?|(?J:(?|(?x:(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|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?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|
  85. )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
  86. /parens_nest_limit=1000,-fullbincode
  87. # Use "expand" to create some very long patterns with nested parentheses, in
  88. # order to test workspace overflow. Again, this varies with code unit width,
  89. # and even when it fails in two modes, the error offset differs. It also varies
  90. # with link size - hence multiple tests with different values.
  91. /(?'ABC'\[[bar](]{792}*THEN:\[A]{255}\[)]{793}/expand,-fullbincode,parens_nest_limit=1000
  92. /(?'ABC'\[[bar](]{793}*THEN:\[A]{255}\[)]{794}/expand,-fullbincode,parens_nest_limit=1000
  93. /(?'ABC'\[[bar](]{1793}*THEN:\[A]{255}\[)]{1794}/expand,-fullbincode,parens_nest_limit=2000
  94. /(?(1)(?1)){8,}+()/debug
  95. abcd
  96. /(?(1)|a(?1)b){2,}+()/debug
  97. abcde
  98. /((?1)(?2)(?3)(?4)(?5)(?6)(?7)(?8)(?9)(?9)(?8)(?7)(?6)(?5)(?4)(?3)(?2)(?1)(?0)){2,}()()()()()()()()()/debug
  99. /([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
  100. /([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))/-fullbincode
  101. #pattern -fullbincode
  102. /\[()]{65535}/expand
  103. # End of testinput8