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.

107 lines
1.9 KiB

  1. # Tests of \C when Unicode support is available. Note that \C is not supported
  2. # for DFA matching in UTF mode, so this test is not run with -dfa. The output
  3. # of this test is different in 8-, 16-, and 32-bit modes. Some tests may match
  4. # in some widths and not in others.
  5. /ab\Cde/utf,info
  6. abXde
  7. # This should produce an error diagnostic (\C in UTF lookbehind) in 8-bit and
  8. # 16-bit modes, but not in 32-bit mode.
  9. /(?<=ab\Cde)X/utf
  10. ab!deXYZ
  11. # Autopossessification tests
  12. /\C+\X \X+\C/Bx
  13. /\C+\X \X+\C/Bx,utf
  14. /\C\X*TӅ;
  15. {0,6}\v+ F
  16. /utf
  17. \= Expect no match
  18. Ӆ\x0a
  19. /\C(\W?ſ)'?{{/utf
  20. \= Expect no match
  21. \\C(\\W?ſ)'?{{
  22. /X(\C{3})/utf
  23. X\x{1234}
  24. X\x{11234}Y
  25. X\x{11234}YZ
  26. /X(\C{4})/utf
  27. X\x{1234}YZ
  28. X\x{11234}YZ
  29. X\x{11234}YZW
  30. /X\C*/utf
  31. XYZabcdce
  32. /X\C*?/utf
  33. XYZabcde
  34. /X\C{3,5}/utf
  35. Xabcdefg
  36. X\x{1234}
  37. X\x{1234}YZ
  38. X\x{1234}\x{512}
  39. X\x{1234}\x{512}YZ
  40. X\x{11234}Y
  41. X\x{11234}YZ
  42. X\x{11234}\x{512}
  43. X\x{11234}\x{512}YZ
  44. X\x{11234}\x{512}\x{11234}Z
  45. /X\C{3,5}?/utf
  46. Xabcdefg
  47. X\x{1234}
  48. X\x{1234}YZ
  49. X\x{1234}\x{512}
  50. X\x{11234}Y
  51. X\x{11234}YZ
  52. X\x{11234}\x{512}YZ
  53. X\x{11234}
  54. /a\Cb/utf
  55. aXb
  56. a\nb
  57. a\x{100}b
  58. /a\C\Cb/utf
  59. a\x{100}b
  60. a\x{12257}b
  61. a\x{12257}\x{11234}b
  62. /ab\Cde/utf
  63. abXde
  64. # This one is here not because it's different to Perl, but because the way
  65. # the captured single code unit is displayed. (In Perl it becomes a character,
  66. # and you can't tell the difference.)
  67. /X(\C)(.*)/utf
  68. X\x{1234}
  69. X\nabc
  70. # This one is here because Perl gives out a grumbly error message (quite
  71. # correctly, but that messes up comparisons).
  72. /a\Cb/utf
  73. \= Expect no match in 8-bit mode
  74. a\x{100}b
  75. /^ab\C/utf,no_start_optimize
  76. \= Expect no match - tests \C at end of subject
  77. ab
  78. /\C[^\v]+\x80/utf
  79. [AΏBŀC]
  80. /\C[^\d]+\x80/utf
  81. [AΏBŀC]
  82. # End of testinput22