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.

108 lines
2.3 KiB

  1. # These test special UTF and UCP features of DFA matching. The output is
  2. # different for the different widths.
  3. #subject dfa
  4. # ----------------------------------------------------
  5. # These are a selection of the more comprehensive tests that are run for
  6. # non-DFA matching.
  7. /X/utf
  8. XX\x{d800}
  9. XX\x{d800}\=offset=3
  10. XX\x{d800}\=no_utf_check
  11. XX\x{da00}
  12. XX\x{da00}\=no_utf_check
  13. XX\x{dc00}
  14. XX\x{dc00}\=no_utf_check
  15. XX\x{de00}
  16. XX\x{de00}\=no_utf_check
  17. XX\x{dfff}
  18. XX\x{dfff}\=no_utf_check
  19. XX\x{110000}
  20. XX\x{d800}\x{1234}
  21. /badutf/utf
  22. X\xdf
  23. XX\xef
  24. XXX\xef\x80
  25. X\xf7
  26. XX\xf7\x80
  27. XXX\xf7\x80\x80
  28. /shortutf/utf
  29. XX\xdf\=ph
  30. XX\xef\=ph
  31. XX\xef\x80\=ph
  32. \xf7\=ph
  33. \xf7\x80\=ph
  34. # ----------------------------------------------------
  35. # UCP and casing tests - except for the first two, these will all fail in 8-bit
  36. # mode because they are testing UCP without UTF and use characters > 255.
  37. /\x{c1}/i,no_start_optimize
  38. \= Expect no match
  39. \x{e1}
  40. /\x{c1}+\x{e1}/iB,ucp
  41. \x{c1}\x{c1}\x{c1}
  42. \x{e1}\x{e1}\x{e1}
  43. /\x{120}\x{c1}/i,ucp,no_start_optimize
  44. \x{121}\x{e1}
  45. /\x{120}\x{c1}/i,ucp
  46. \x{121}\x{e1}
  47. /[^\x{120}]/i,no_start_optimize
  48. \x{121}
  49. /[^\x{120}]/i,ucp,no_start_optimize
  50. \= Expect no match
  51. \x{121}
  52. /[^\x{120}]/i
  53. \x{121}
  54. /[^\x{120}]/i,ucp
  55. \= Expect no match
  56. \x{121}
  57. /\x{120}{2}/i,ucp
  58. \x{121}\x{121}
  59. /[^\x{120}]{2}/i,ucp
  60. \= Expect no match
  61. \x{121}\x{121}
  62. # ----------------------------------------------------
  63. # ----------------------------------------------------
  64. # Tests for handling 0xffffffff in caseless UCP mode. They only apply to 32-bit
  65. # mode; for the other widths they will fail.
  66. /k*\x{ffffffff}/caseless,ucp
  67. \x{ffffffff}
  68. /k+\x{ffffffff}/caseless,ucp,no_start_optimize
  69. K\x{ffffffff}
  70. \= Expect no match
  71. \x{ffffffff}\x{ffffffff}
  72. /k{2}\x{ffffffff}/caseless,ucp,no_start_optimize
  73. \= Expect no match
  74. \x{ffffffff}\x{ffffffff}\x{ffffffff}
  75. /k\x{ffffffff}/caseless,ucp,no_start_optimize
  76. K\x{ffffffff}
  77. \= Expect no match
  78. \x{ffffffff}\x{ffffffff}\x{ffffffff}
  79. /k{2,}?Z/caseless,ucp,no_start_optimize,no_auto_possess
  80. \= Expect no match
  81. Kk\x{ffffffff}\x{ffffffff}\x{ffffffff}Z
  82. # ----------------------------------------------------
  83. # End of testinput14