testinputEBC 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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