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.

137 lines
2.0 KiB

  1. # This is a specialized test for checking, when PCRE2 is compiled with the
  2. # EBCDIC option but in an ASCII environment, that newline, white space, and \c
  3. # functionality is working. It catches cases where explicit values such as 0x0a
  4. # have been used instead of names like CHAR_LF. Needless to say, it is not a
  5. # genuine EBCDIC test! In patterns, alphabetic characters that follow a
  6. # backslash must be in EBCDIC code. In data, NL, NEL, LF, ESC, and DEL must be
  7. # in EBCDIC, but can of course be specified as escapes.
  8. # Test default newline and variations
  9. /^A/m
  10. ABC
  11. 12\x15ABC
  12. /^A/m,newline=any
  13. 12\x15ABC
  14. 12\x0dABC
  15. 12\x0d\x15ABC
  16. 12\x25ABC
  17. /^A/m,newline=anycrlf
  18. 12\x15ABC
  19. 12\x0dABC
  20. 12\x0d\x15ABC
  21. ** Fail
  22. 12\x25ABC
  23. # Test \h
  24. /^A\�/
  25. A B
  26. A\x41B
  27. # Test \H
  28. /^A\�/
  29. AB
  30. A\x42B
  31. ** Fail
  32. A B
  33. A\x41B
  34. # Test \R
  35. /^A\�/
  36. A\x15B
  37. A\x0dB
  38. A\x25B
  39. A\x0bB
  40. A\x0cB
  41. ** Fail
  42. A B
  43. # Test \v
  44. /^A\�/
  45. A\x15B
  46. A\x0dB
  47. A\x25B
  48. A\x0bB
  49. A\x0cB
  50. ** Fail
  51. A B
  52. # Test \V
  53. /^A\�/
  54. A B
  55. ** Fail
  56. A\x15B
  57. A\x0dB
  58. A\x25B
  59. A\x0bB
  60. A\x0cB
  61. # For repeated items, use an atomic group so that the output is the same
  62. # for DFA matching (otherwise it may show multiple matches).
  63. # Test \h+
  64. /^A(?>\�+)/
  65. A B
  66. # Test \H+
  67. /^A(?>\�+)/
  68. AB
  69. ** Fail
  70. A B
  71. # Test \R+
  72. /^A(?>\�+)/
  73. A\x15B
  74. A\x0dB
  75. A\x25B
  76. A\x0bB
  77. A\x0cB
  78. ** Fail
  79. A B
  80. # Test \v+
  81. /^A(?>\�+)/
  82. A\x15B
  83. A\x0dB
  84. A\x25B
  85. A\x0bB
  86. A\x0cB
  87. ** Fail
  88. A B
  89. # Test \V+
  90. /^A(?>\�+)/
  91. A B
  92. ** Fail
  93. A\x15B
  94. A\x0dB
  95. A\x25B
  96. A\x0bB
  97. A\x0cB
  98. # Test \c functionality
  99. /\�@\�A\�b\�C\�d\�E\�f\�G\�h\�I\�J\�K\�l\�m\�N\�O\�p\�q\�r\�S\�T\�u\�V\�W\�X\�y\�Z/
  100. \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f
  101. /\�[\�\\�]\�^\�_/
  102. \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f
  103. /\�?/
  104. A\xffB
  105. /\�&/
  106. # End