testoutputEBC 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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. 0: A
  12. 12\x15ABC
  13. 0: A
  14. /^A/m<any>
  15. 12\x15ABC
  16. 0: A
  17. 12\x0dABC
  18. 0: A
  19. 12\x0d\x15ABC
  20. 0: A
  21. 12\x25ABC
  22. 0: A
  23. /^A/m<anycrlf>
  24. 12\x15ABC
  25. 0: A
  26. 12\x0dABC
  27. 0: A
  28. 12\x0d\x15ABC
  29. 0: A
  30. ** Fail
  31. No match
  32. 12\x25ABC
  33. No match
  34. /-- Test \h --/
  35. /^A\ˆ/
  36. A B
  37. 0: A\x20
  38. A\x41B
  39. 0: AA
  40. /-- Test \H --/
  41. /^A\È/
  42. AB
  43. 0: AB
  44. A\x42B
  45. 0: AB
  46. ** Fail
  47. No match
  48. A B
  49. No match
  50. A\x41B
  51. No match
  52. /-- Test \R --/
  53. /^A\Ù/
  54. A\x15B
  55. 0: A\x15
  56. A\x0dB
  57. 0: A\x0d
  58. A\x25B
  59. 0: A\x25
  60. A\x0bB
  61. 0: A\x0b
  62. A\x0cB
  63. 0: A\x0c
  64. ** Fail
  65. No match
  66. A B
  67. No match
  68. /-- Test \v --/
  69. /^A\¥/
  70. A\x15B
  71. 0: A\x15
  72. A\x0dB
  73. 0: A\x0d
  74. A\x25B
  75. 0: A\x25
  76. A\x0bB
  77. 0: A\x0b
  78. A\x0cB
  79. 0: A\x0c
  80. ** Fail
  81. No match
  82. A B
  83. No match
  84. /-- Test \V --/
  85. /^A\å/
  86. A B
  87. 0: A\x20
  88. ** Fail
  89. No match
  90. A\x15B
  91. No match
  92. A\x0dB
  93. No match
  94. A\x25B
  95. No match
  96. A\x0bB
  97. No match
  98. A\x0cB
  99. No match
  100. /-- For repeated items, use an atomic group so that the output is the same
  101. for DFA matching (otherwise it may show multiple matches). --/
  102. /-- Test \h+ --/
  103. /^A(?>\ˆ+)/
  104. A B
  105. 0: A\x20
  106. /-- Test \H+ --/
  107. /^A(?>\È+)/
  108. AB
  109. 0: AB
  110. ** Fail
  111. No match
  112. A B
  113. No match
  114. /-- Test \R+ --/
  115. /^A(?>\Ù+)/
  116. A\x15B
  117. 0: A\x15
  118. A\x0dB
  119. 0: A\x0d
  120. A\x25B
  121. 0: A\x25
  122. A\x0bB
  123. 0: A\x0b
  124. A\x0cB
  125. 0: A\x0c
  126. ** Fail
  127. No match
  128. A B
  129. No match
  130. /-- Test \v+ --/
  131. /^A(?>\¥+)/
  132. A\x15B
  133. 0: A\x15
  134. A\x0dB
  135. 0: A\x0d
  136. A\x25B
  137. 0: A\x25
  138. A\x0bB
  139. 0: A\x0b
  140. A\x0cB
  141. 0: A\x0c
  142. ** Fail
  143. No match
  144. A B
  145. No match
  146. /-- Test \V+ --/
  147. /^A(?>\å+)/
  148. A B
  149. 0: A\x20B
  150. ** Fail
  151. No match
  152. A\x15B
  153. No match
  154. A\x0dB
  155. No match
  156. A\x25B
  157. No match
  158. A\x0bB
  159. No match
  160. A\x0cB
  161. No match
  162. /-- End --/