testinputEBC 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /-- This is a specialized test for checking, when PCRE is compiled with the
  2. EBCDIC option but in an ASCII environment, that newline and white space
  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 backslash
  6. must be in EBCDIC code. In data, newlines and other spacing characters must be
  7. in EBCDIC, but can be specified as escapes. --/
  8. /-- Test default newline and variations --/
  9. /^A/m
  10. ABC
  11. 12\x15ABC
  12. /^A/m<any>
  13. 12\x15ABC
  14. 12\x0dABC
  15. 12\x0d\x15ABC
  16. 12\x25ABC
  17. /^A/m<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. /-- End --/