@port-labs/jq-node-bindings 0.0.13 → 0.0.15-dev1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (453) hide show
  1. package/README.md +6 -1
  2. package/binding.gyp +41 -19
  3. package/configure +1 -1
  4. package/deps/jq/.gitattributes +12 -0
  5. package/deps/jq/AUTHORS +149 -43
  6. package/deps/jq/COPYING +75 -1
  7. package/deps/jq/ChangeLog +2 -2
  8. package/deps/jq/Makefile.am +106 -65
  9. package/deps/jq/NEWS.md +391 -0
  10. package/deps/jq/README.md +54 -52
  11. package/deps/jq/SECURITY.md +7 -0
  12. package/deps/jq/compile-ios.sh +106 -102
  13. package/deps/jq/configure.ac +72 -59
  14. package/deps/jq/docs/Pipfile +14 -0
  15. package/deps/jq/docs/Pipfile.lock +415 -0
  16. package/deps/jq/docs/README.md +15 -14
  17. package/deps/jq/docs/build_manpage.py +251 -0
  18. package/deps/jq/docs/build_mantests.py +21 -0
  19. package/deps/jq/docs/build_website.py +95 -0
  20. package/deps/jq/docs/content/download/default.yml +249 -0
  21. package/deps/jq/docs/content/index.yml +83 -0
  22. package/deps/jq/docs/content/{3.manual/v1.6 → manual/dev}/manual.yml +992 -452
  23. package/deps/jq/docs/content/{3.manual → manual}/v1.3/manual.yml +105 -116
  24. package/deps/jq/docs/content/{3.manual → manual}/v1.4/manual.yml +122 -129
  25. package/deps/jq/docs/content/{3.manual → manual}/v1.5/manual.yml +313 -262
  26. package/deps/jq/docs/content/{3.manual → manual/v1.6}/manual.yml +407 -332
  27. package/deps/jq/docs/content/manual/v1.7/manual.yml +3697 -0
  28. package/deps/jq/docs/content/tutorial/default.yml +337 -0
  29. package/deps/jq/docs/manual_schema.yml +60 -0
  30. package/deps/jq/docs/public/css/style.css +99 -0
  31. package/deps/jq/docs/public/icon.png +0 -0
  32. package/deps/jq/docs/public/icon.svg +1 -0
  33. package/deps/jq/docs/public/jq.svg +1 -0
  34. package/deps/jq/docs/public/js/manual-search.js +31 -49
  35. package/deps/jq/docs/templates/default.html.j2 +31 -0
  36. package/deps/jq/docs/templates/index.html.j2 +58 -0
  37. package/deps/jq/docs/templates/manual.html.j2 +120 -0
  38. package/deps/jq/docs/templates/shared/_footer.html.j2 +14 -0
  39. package/deps/jq/docs/templates/shared/_head.html.j2 +23 -0
  40. package/deps/jq/docs/templates/shared/_navbar.html.j2 +40 -0
  41. package/deps/jq/docs/validate_manual_schema.py +19 -0
  42. package/deps/jq/jq.1.prebuilt +1102 -294
  43. package/deps/jq/jq.spec +2 -3
  44. package/deps/jq/libjq.pc.in +11 -0
  45. package/deps/jq/m4/ax_pthread.m4 +522 -0
  46. package/deps/jq/modules/oniguruma/.travis.yml +17 -0
  47. package/deps/jq/modules/oniguruma/CMakeLists.txt +206 -41
  48. package/deps/jq/modules/oniguruma/COPYING +23 -25
  49. package/deps/jq/modules/oniguruma/HISTORY +368 -23
  50. package/deps/jq/modules/oniguruma/Makefile.am +61 -7
  51. package/deps/jq/modules/oniguruma/README +34 -20
  52. package/deps/jq/modules/oniguruma/README.md +106 -33
  53. package/deps/jq/modules/oniguruma/README_japanese +183 -0
  54. package/deps/jq/modules/oniguruma/autogen.sh +9 -0
  55. package/deps/jq/modules/oniguruma/cmake/Config.cmake.in +4 -0
  56. package/deps/jq/modules/oniguruma/configure.ac +66 -55
  57. package/deps/jq/modules/oniguruma/doc/API +485 -42
  58. package/deps/jq/modules/oniguruma/doc/API.ja +732 -293
  59. package/deps/jq/modules/oniguruma/doc/CALLOUTS.API +397 -0
  60. package/deps/jq/modules/oniguruma/doc/CALLOUTS.API.ja +393 -0
  61. package/deps/jq/modules/oniguruma/doc/CALLOUTS.BUILTIN +95 -0
  62. package/deps/jq/modules/oniguruma/doc/CALLOUTS.BUILTIN.ja +93 -0
  63. package/deps/jq/modules/oniguruma/doc/FAQ +3 -3
  64. package/deps/jq/modules/oniguruma/doc/FAQ.ja +8 -8
  65. package/deps/jq/modules/oniguruma/doc/RE +223 -63
  66. package/deps/jq/modules/oniguruma/doc/RE.ja +420 -265
  67. package/deps/jq/modules/oniguruma/doc/SYNTAX.md +1091 -0
  68. package/deps/jq/modules/oniguruma/doc/UNICODE_PROPERTIES +840 -697
  69. package/deps/jq/modules/oniguruma/harnesses/ascii_compatible.dict +113 -0
  70. package/deps/jq/modules/oniguruma/harnesses/base.c +749 -0
  71. package/deps/jq/modules/oniguruma/harnesses/deluxe.c +206 -0
  72. package/deps/jq/modules/oniguruma/harnesses/dict_conv.py +72 -0
  73. package/deps/jq/modules/oniguruma/harnesses/fuzzer.options +2 -0
  74. package/deps/jq/modules/oniguruma/harnesses/libfuzzer-onig.cpp +45 -0
  75. package/deps/jq/modules/oniguruma/harnesses/regset.c +392 -0
  76. package/deps/jq/modules/oniguruma/index.html +16 -5
  77. package/deps/jq/modules/oniguruma/index_ja.html +16 -5
  78. package/deps/jq/modules/oniguruma/make_win.bat +5 -0
  79. package/deps/jq/modules/oniguruma/make_win32.bat +5 -3
  80. package/deps/jq/modules/oniguruma/make_win64.bat +5 -3
  81. package/deps/jq/modules/oniguruma/onig-config.cmake.in +80 -0
  82. package/deps/jq/modules/oniguruma/onig-config.in +1 -1
  83. package/deps/jq/modules/oniguruma/oniguruma.pc.cmake.in +1 -1
  84. package/deps/jq/modules/oniguruma/oniguruma.pc.in +0 -1
  85. package/deps/jq/modules/oniguruma/sample/CMakeLists.txt +9 -2
  86. package/deps/jq/modules/oniguruma/sample/Makefile.am +24 -5
  87. package/deps/jq/modules/oniguruma/sample/bug_fix.c +13 -51
  88. package/deps/jq/modules/oniguruma/sample/callback_each_match.c +168 -0
  89. package/deps/jq/modules/oniguruma/sample/callout.c +268 -0
  90. package/deps/jq/modules/oniguruma/sample/count.c +125 -0
  91. package/deps/jq/modules/oniguruma/sample/crnl.c +6 -4
  92. package/deps/jq/modules/oniguruma/sample/echo.c +136 -0
  93. package/deps/jq/modules/oniguruma/sample/encode.c +53 -146
  94. package/deps/jq/modules/oniguruma/sample/listcap.c +18 -10
  95. package/deps/jq/modules/oniguruma/sample/names.c +10 -6
  96. package/deps/jq/modules/oniguruma/sample/posix.c +13 -2
  97. package/deps/jq/modules/oniguruma/sample/regset.c +95 -0
  98. package/deps/jq/modules/oniguruma/sample/scan.c +20 -6
  99. package/deps/jq/modules/oniguruma/sample/simple.c +8 -4
  100. package/deps/jq/modules/oniguruma/sample/sql.c +13 -8
  101. package/deps/jq/modules/oniguruma/sample/syntax.c +11 -10
  102. package/deps/jq/modules/oniguruma/sample/user_property.c +12 -7
  103. package/deps/jq/modules/oniguruma/src/Makefile.am +41 -15
  104. package/deps/jq/modules/oniguruma/src/Makefile.windows +196 -183
  105. package/deps/jq/modules/oniguruma/src/ascii.c +64 -7
  106. package/deps/jq/modules/oniguruma/src/big5.c +25 -15
  107. package/deps/jq/modules/oniguruma/src/config.h.cmake.in +7 -22
  108. package/deps/jq/modules/oniguruma/src/config.h.win32 +56 -84
  109. package/deps/jq/modules/oniguruma/src/config.h.win64 +56 -84
  110. package/deps/jq/modules/oniguruma/src/config.h.windows.in +62 -0
  111. package/deps/jq/modules/oniguruma/src/cp1251.c +14 -8
  112. package/deps/jq/modules/oniguruma/src/euc_jp.c +28 -30
  113. package/deps/jq/modules/oniguruma/src/euc_jp_prop.c +25 -32
  114. package/deps/jq/modules/oniguruma/src/euc_jp_prop.gperf +1 -2
  115. package/deps/jq/modules/oniguruma/src/euc_kr.c +27 -15
  116. package/deps/jq/modules/oniguruma/src/euc_tw.c +40 -17
  117. package/deps/jq/modules/oniguruma/src/gb18030.c +177 -119
  118. package/deps/jq/modules/oniguruma/src/gperf_fold_key_conv.py +12 -8
  119. package/deps/jq/modules/oniguruma/src/gperf_unfold_key_conv.py +8 -6
  120. package/deps/jq/modules/oniguruma/src/iso8859_1.c +92 -91
  121. package/deps/jq/modules/oniguruma/src/iso8859_10.c +13 -29
  122. package/deps/jq/modules/oniguruma/src/iso8859_11.c +4 -2
  123. package/deps/jq/modules/oniguruma/src/iso8859_13.c +13 -33
  124. package/deps/jq/modules/oniguruma/src/iso8859_14.c +13 -30
  125. package/deps/jq/modules/oniguruma/src/iso8859_15.c +13 -34
  126. package/deps/jq/modules/oniguruma/src/iso8859_16.c +13 -29
  127. package/deps/jq/modules/oniguruma/src/iso8859_2.c +13 -29
  128. package/deps/jq/modules/oniguruma/src/iso8859_3.c +13 -33
  129. package/deps/jq/modules/oniguruma/src/iso8859_4.c +13 -32
  130. package/deps/jq/modules/oniguruma/src/iso8859_5.c +16 -23
  131. package/deps/jq/modules/oniguruma/src/iso8859_6.c +4 -2
  132. package/deps/jq/modules/oniguruma/src/iso8859_7.c +14 -29
  133. package/deps/jq/modules/oniguruma/src/iso8859_8.c +4 -2
  134. package/deps/jq/modules/oniguruma/src/iso8859_9.c +13 -33
  135. package/deps/jq/modules/oniguruma/src/koi8.c +14 -27
  136. package/deps/jq/modules/oniguruma/src/koi8_r.c +12 -19
  137. package/deps/jq/modules/oniguruma/src/make_property.sh +21 -0
  138. package/deps/jq/modules/oniguruma/src/make_unicode_egcb.sh +7 -0
  139. package/deps/jq/modules/oniguruma/src/make_unicode_egcb_data.py +267 -0
  140. package/deps/jq/modules/oniguruma/src/make_unicode_fold.sh +25 -11
  141. package/deps/jq/modules/oniguruma/src/make_unicode_fold_data.py +206 -26
  142. package/deps/jq/modules/oniguruma/src/make_unicode_property.sh +19 -10
  143. package/deps/jq/modules/oniguruma/src/make_unicode_property_data.py +474 -375
  144. package/deps/jq/modules/oniguruma/src/make_unicode_wb.sh +7 -0
  145. package/deps/jq/modules/oniguruma/src/make_unicode_wb_data.py +267 -0
  146. package/deps/jq/modules/oniguruma/src/mktable.c +28 -24
  147. package/deps/jq/modules/oniguruma/src/onig_init.c +2 -2
  148. package/deps/jq/modules/oniguruma/src/oniggnu.h +7 -5
  149. package/deps/jq/modules/oniguruma/src/onigposix.h +40 -16
  150. package/deps/jq/modules/oniguruma/src/oniguruma.h +357 -107
  151. package/deps/jq/modules/oniguruma/src/regcomp.c +6214 -3933
  152. package/deps/jq/modules/oniguruma/src/regenc.c +197 -120
  153. package/deps/jq/modules/oniguruma/src/regenc.h +106 -63
  154. package/deps/jq/modules/oniguruma/src/regerror.c +112 -91
  155. package/deps/jq/modules/oniguruma/src/regexec.c +4876 -2010
  156. package/deps/jq/modules/oniguruma/src/regext.c +8 -8
  157. package/deps/jq/modules/oniguruma/src/reggnu.c +13 -17
  158. package/deps/jq/modules/oniguruma/src/regint.h +757 -491
  159. package/deps/jq/modules/oniguruma/src/regparse.c +7204 -3240
  160. package/deps/jq/modules/oniguruma/src/regparse.h +361 -218
  161. package/deps/jq/modules/oniguruma/src/regposerr.c +49 -9
  162. package/deps/jq/modules/oniguruma/src/regposix.c +106 -24
  163. package/deps/jq/modules/oniguruma/src/regsyntax.c +66 -13
  164. package/deps/jq/modules/oniguruma/src/regtrav.c +1 -1
  165. package/deps/jq/modules/oniguruma/src/regversion.c +6 -4
  166. package/deps/jq/modules/oniguruma/src/sjis.c +23 -52
  167. package/deps/jq/modules/oniguruma/src/sjis_prop.c +25 -32
  168. package/deps/jq/modules/oniguruma/src/sjis_prop.gperf +1 -2
  169. package/deps/jq/modules/oniguruma/src/st.c +248 -249
  170. package/deps/jq/modules/oniguruma/src/st.h +4 -5
  171. package/deps/jq/modules/oniguruma/src/unicode.c +869 -294
  172. package/deps/jq/modules/oniguruma/src/unicode_egcb_data.c +1419 -0
  173. package/deps/jq/modules/oniguruma/src/unicode_fold1_key.c +1829 -1300
  174. package/deps/jq/modules/oniguruma/src/unicode_fold2_key.c +32 -9
  175. package/deps/jq/modules/oniguruma/src/unicode_fold3_key.c +32 -9
  176. package/deps/jq/modules/oniguruma/src/unicode_fold_data.c +1210 -984
  177. package/deps/jq/modules/oniguruma/src/unicode_property_data.c +22480 -15198
  178. package/deps/jq/modules/oniguruma/src/unicode_property_data_posix.c +1463 -591
  179. package/deps/jq/modules/oniguruma/src/unicode_unfold_key.c +1958 -1418
  180. package/deps/jq/modules/oniguruma/src/unicode_wb_data.c +1106 -0
  181. package/deps/jq/modules/oniguruma/src/utf16_be.c +90 -49
  182. package/deps/jq/modules/oniguruma/src/utf16_le.c +80 -49
  183. package/deps/jq/modules/oniguruma/src/utf32_be.c +14 -42
  184. package/deps/jq/modules/oniguruma/src/utf32_le.c +13 -40
  185. package/deps/jq/modules/oniguruma/src/utf8.c +33 -78
  186. package/deps/jq/modules/oniguruma/test/CMakeLists.txt +55 -0
  187. package/deps/jq/modules/oniguruma/test/Makefile.am +65 -10
  188. package/deps/jq/modules/oniguruma/test/test.sh +17 -0
  189. package/deps/jq/modules/oniguruma/test/test_back.c +1450 -0
  190. package/deps/jq/modules/oniguruma/test/test_options.c +228 -0
  191. package/deps/jq/modules/oniguruma/test/test_regset.c +466 -0
  192. package/deps/jq/modules/oniguruma/test/test_syntax.c +365 -0
  193. package/deps/jq/modules/oniguruma/test/test_utf8.c +1761 -0
  194. package/deps/jq/modules/oniguruma/test/testc.c +128 -88
  195. package/deps/jq/modules/oniguruma/test/testp.c +613 -0
  196. package/deps/jq/modules/oniguruma/test/testu.c +75 -28
  197. package/deps/jq/modules/oniguruma/tis-ci/stub.c +3 -0
  198. package/deps/jq/modules/oniguruma/tis-ci/test_back.config +26 -0
  199. package/deps/jq/modules/oniguruma/tis-ci/test_regset.config +20 -0
  200. package/deps/jq/modules/oniguruma/tis-ci/test_syntax.config +26 -0
  201. package/deps/jq/modules/oniguruma/tis-ci/test_utf8.config +25 -0
  202. package/deps/jq/modules/oniguruma/tis-ci/testc.config +26 -0
  203. package/deps/jq/modules/oniguruma/tis-ci/testu.config +24 -0
  204. package/deps/jq/modules/oniguruma/tis.config +1336 -0
  205. package/deps/jq/modules/oniguruma/windows/CMakeLists.txt +8 -0
  206. package/deps/jq/modules/oniguruma/windows/testc.c +865 -869
  207. package/deps/jq/scripts/update-website +6 -5
  208. package/deps/jq/scripts/version +10 -7
  209. package/deps/jq/sig/jq-release-new.key +29 -0
  210. package/deps/jq/sig/v1.4/sha256sum.txt +1 -0
  211. package/deps/jq/sig/v1.5/sha256sum.txt +2 -0
  212. package/deps/jq/sig/v1.5rc1/sha256sum.txt +1 -0
  213. package/deps/jq/sig/v1.5rc2/sha256sum.txt +2 -0
  214. package/deps/jq/sig/v1.6/sha256sum.txt +2 -0
  215. package/deps/jq/sig/v1.7/jq-1.7.tar.gz.asc +16 -0
  216. package/deps/jq/sig/v1.7/jq-1.7.zip.asc +16 -0
  217. package/deps/jq/sig/v1.7/jq-linux-amd64.asc +16 -0
  218. package/deps/jq/sig/v1.7/jq-linux-arm64.asc +16 -0
  219. package/deps/jq/sig/v1.7/jq-linux-armel.asc +16 -0
  220. package/deps/jq/sig/v1.7/jq-linux-armhf.asc +16 -0
  221. package/deps/jq/sig/v1.7/jq-linux-i386.asc +16 -0
  222. package/deps/jq/sig/v1.7/jq-linux-mips.asc +16 -0
  223. package/deps/jq/sig/v1.7/jq-linux-mips64.asc +16 -0
  224. package/deps/jq/sig/v1.7/jq-linux-mips64el.asc +16 -0
  225. package/deps/jq/sig/v1.7/jq-linux-mips64r6.asc +16 -0
  226. package/deps/jq/sig/v1.7/jq-linux-mips64r6el.asc +16 -0
  227. package/deps/jq/sig/v1.7/jq-linux-mipsel.asc +16 -0
  228. package/deps/jq/sig/v1.7/jq-linux-mipsr6.asc +16 -0
  229. package/deps/jq/sig/v1.7/jq-linux-mipsr6el.asc +16 -0
  230. package/deps/jq/sig/v1.7/jq-linux-powerpc.asc +16 -0
  231. package/deps/jq/sig/v1.7/jq-linux-ppc64el.asc +16 -0
  232. package/deps/jq/sig/v1.7/jq-linux-riscv64.asc +16 -0
  233. package/deps/jq/sig/v1.7/jq-linux-s390x.asc +16 -0
  234. package/deps/jq/sig/v1.7/jq-macos-amd64.asc +16 -0
  235. package/deps/jq/sig/v1.7/jq-macos-arm64.asc +16 -0
  236. package/deps/jq/sig/v1.7/jq-windows-amd64.exe.asc +16 -0
  237. package/deps/jq/sig/v1.7/jq-windows-i386.exe.asc +16 -0
  238. package/deps/jq/sig/v1.7/sha256sum.txt +23 -0
  239. package/deps/jq/sig/v1.7.1/jq-1.7.1.tar.gz.asc +16 -0
  240. package/deps/jq/sig/v1.7.1/jq-1.7.1.zip.asc +16 -0
  241. package/deps/jq/sig/v1.7.1/jq-linux-amd64.asc +16 -0
  242. package/deps/jq/sig/v1.7.1/jq-linux-arm64.asc +16 -0
  243. package/deps/jq/sig/v1.7.1/jq-linux-armel.asc +16 -0
  244. package/deps/jq/sig/v1.7.1/jq-linux-armhf.asc +16 -0
  245. package/deps/jq/sig/v1.7.1/jq-linux-i386.asc +16 -0
  246. package/deps/jq/sig/v1.7.1/jq-linux-mips.asc +16 -0
  247. package/deps/jq/sig/v1.7.1/jq-linux-mips64.asc +16 -0
  248. package/deps/jq/sig/v1.7.1/jq-linux-mips64el.asc +16 -0
  249. package/deps/jq/sig/v1.7.1/jq-linux-mips64r6.asc +16 -0
  250. package/deps/jq/sig/v1.7.1/jq-linux-mips64r6el.asc +16 -0
  251. package/deps/jq/sig/v1.7.1/jq-linux-mipsel.asc +16 -0
  252. package/deps/jq/sig/v1.7.1/jq-linux-mipsr6.asc +16 -0
  253. package/deps/jq/sig/v1.7.1/jq-linux-mipsr6el.asc +16 -0
  254. package/deps/jq/sig/v1.7.1/jq-linux-powerpc.asc +16 -0
  255. package/deps/jq/sig/v1.7.1/jq-linux-ppc64el.asc +16 -0
  256. package/deps/jq/sig/v1.7.1/jq-linux-riscv64.asc +16 -0
  257. package/deps/jq/sig/v1.7.1/jq-linux-s390x.asc +16 -0
  258. package/deps/jq/sig/v1.7.1/jq-linux64.asc +16 -0
  259. package/deps/jq/sig/v1.7.1/jq-macos-amd64.asc +16 -0
  260. package/deps/jq/sig/v1.7.1/jq-macos-arm64.asc +16 -0
  261. package/deps/jq/sig/v1.7.1/jq-osx-amd64.asc +16 -0
  262. package/deps/jq/sig/v1.7.1/jq-win64.exe.asc +16 -0
  263. package/deps/jq/sig/v1.7.1/jq-windows-amd64.exe.asc +16 -0
  264. package/deps/jq/sig/v1.7.1/jq-windows-i386.exe.asc +16 -0
  265. package/deps/jq/sig/v1.7.1/sha256sum.txt +26 -0
  266. package/deps/jq/sig/v1.7rc1/jq-1.7rc1.tar.gz.asc +16 -0
  267. package/deps/jq/sig/v1.7rc1/jq-1.7rc1.zip.asc +16 -0
  268. package/deps/jq/sig/v1.7rc1/jq-linux-amd64.asc +16 -0
  269. package/deps/jq/sig/v1.7rc1/jq-linux-arm64.asc +16 -0
  270. package/deps/jq/sig/v1.7rc1/jq-linux-armel.asc +16 -0
  271. package/deps/jq/sig/v1.7rc1/jq-linux-armhf.asc +16 -0
  272. package/deps/jq/sig/v1.7rc1/jq-linux-i386.asc +16 -0
  273. package/deps/jq/sig/v1.7rc1/jq-linux-mips.asc +16 -0
  274. package/deps/jq/sig/v1.7rc1/jq-linux-mips64.asc +16 -0
  275. package/deps/jq/sig/v1.7rc1/jq-linux-mips64el.asc +16 -0
  276. package/deps/jq/sig/v1.7rc1/jq-linux-mips64r6.asc +16 -0
  277. package/deps/jq/sig/v1.7rc1/jq-linux-mips64r6el.asc +16 -0
  278. package/deps/jq/sig/v1.7rc1/jq-linux-mipsel.asc +16 -0
  279. package/deps/jq/sig/v1.7rc1/jq-linux-mipsr6.asc +16 -0
  280. package/deps/jq/sig/v1.7rc1/jq-linux-mipsr6el.asc +16 -0
  281. package/deps/jq/sig/v1.7rc1/jq-linux-powerpc.asc +16 -0
  282. package/deps/jq/sig/v1.7rc1/jq-linux-ppc64el.asc +16 -0
  283. package/deps/jq/sig/v1.7rc1/jq-linux-riscv64.asc +16 -0
  284. package/deps/jq/sig/v1.7rc1/jq-linux-s390x.asc +16 -0
  285. package/deps/jq/sig/v1.7rc1/jq-macos-amd64.asc +16 -0
  286. package/deps/jq/sig/v1.7rc1/jq-macos-arm64.asc +16 -0
  287. package/deps/jq/sig/v1.7rc1/jq-windows-amd64.exe.asc +16 -0
  288. package/deps/jq/sig/v1.7rc1/jq-windows-i386.exe.asc +16 -0
  289. package/deps/jq/sig/v1.7rc1/sha256sum.txt +23 -0
  290. package/deps/jq/sig/v1.7rc2/jq-1.7rc2.tar.gz.asc +16 -0
  291. package/deps/jq/sig/v1.7rc2/jq-1.7rc2.zip.asc +16 -0
  292. package/deps/jq/sig/v1.7rc2/jq-linux-amd64.asc +16 -0
  293. package/deps/jq/sig/v1.7rc2/jq-linux-arm64.asc +16 -0
  294. package/deps/jq/sig/v1.7rc2/jq-linux-armel.asc +16 -0
  295. package/deps/jq/sig/v1.7rc2/jq-linux-armhf.asc +16 -0
  296. package/deps/jq/sig/v1.7rc2/jq-linux-i386.asc +16 -0
  297. package/deps/jq/sig/v1.7rc2/jq-linux-mips.asc +16 -0
  298. package/deps/jq/sig/v1.7rc2/jq-linux-mips64.asc +16 -0
  299. package/deps/jq/sig/v1.7rc2/jq-linux-mips64el.asc +16 -0
  300. package/deps/jq/sig/v1.7rc2/jq-linux-mips64r6.asc +16 -0
  301. package/deps/jq/sig/v1.7rc2/jq-linux-mips64r6el.asc +16 -0
  302. package/deps/jq/sig/v1.7rc2/jq-linux-mipsel.asc +16 -0
  303. package/deps/jq/sig/v1.7rc2/jq-linux-mipsr6.asc +16 -0
  304. package/deps/jq/sig/v1.7rc2/jq-linux-mipsr6el.asc +16 -0
  305. package/deps/jq/sig/v1.7rc2/jq-linux-powerpc.asc +16 -0
  306. package/deps/jq/sig/v1.7rc2/jq-linux-ppc64el.asc +16 -0
  307. package/deps/jq/sig/v1.7rc2/jq-linux-riscv64.asc +16 -0
  308. package/deps/jq/sig/v1.7rc2/jq-linux-s390x.asc +16 -0
  309. package/deps/jq/sig/v1.7rc2/jq-macos-amd64.asc +16 -0
  310. package/deps/jq/sig/v1.7rc2/jq-macos-arm64.asc +16 -0
  311. package/deps/jq/sig/v1.7rc2/jq-windows-amd64.exe.asc +16 -0
  312. package/deps/jq/sig/v1.7rc2/jq-windows-i386.exe.asc +16 -0
  313. package/deps/jq/sig/v1.7rc2/sha256sum.txt +23 -0
  314. package/deps/jq/src/builtin.c +537 -343
  315. package/deps/jq/src/builtin.h +18 -0
  316. package/deps/jq/src/builtin.jq +116 -143
  317. package/deps/jq/src/bytecode.h +8 -4
  318. package/deps/jq/src/compile.c +157 -143
  319. package/deps/jq/src/compile.h +3 -4
  320. package/deps/jq/src/decNumber/ICU-license.html +45 -0
  321. package/deps/jq/src/decNumber/decBasic.c +3908 -0
  322. package/deps/jq/src/decNumber/decCommon.c +1835 -0
  323. package/deps/jq/src/decNumber/decContext.c +437 -0
  324. package/deps/jq/src/decNumber/decContext.h +254 -0
  325. package/deps/jq/src/decNumber/decDPD.h +1185 -0
  326. package/deps/jq/src/decNumber/decDouble.c +140 -0
  327. package/deps/jq/src/decNumber/decDouble.h +155 -0
  328. package/deps/jq/src/decNumber/decNumber.c +8143 -0
  329. package/deps/jq/src/decNumber/decNumber.h +182 -0
  330. package/deps/jq/src/decNumber/decNumberLocal.h +757 -0
  331. package/deps/jq/src/decNumber/decPacked.c +220 -0
  332. package/deps/jq/src/decNumber/decPacked.h +52 -0
  333. package/deps/jq/src/decNumber/decQuad.c +135 -0
  334. package/deps/jq/src/decNumber/decQuad.h +177 -0
  335. package/deps/jq/src/decNumber/decSingle.c +71 -0
  336. package/deps/jq/src/decNumber/decSingle.h +86 -0
  337. package/deps/jq/src/decNumber/decimal128.c +553 -0
  338. package/deps/jq/src/decNumber/decimal128.h +81 -0
  339. package/deps/jq/src/decNumber/decimal32.c +476 -0
  340. package/deps/jq/src/decNumber/decimal32.h +81 -0
  341. package/deps/jq/src/decNumber/decimal64.c +839 -0
  342. package/deps/jq/src/decNumber/decimal64.h +83 -0
  343. package/deps/jq/src/decNumber/decnumber.pdf +0 -0
  344. package/deps/jq/src/decNumber/example1.c +38 -0
  345. package/deps/jq/src/decNumber/example2.c +52 -0
  346. package/deps/jq/src/decNumber/example3.c +64 -0
  347. package/deps/jq/src/decNumber/example4.c +61 -0
  348. package/deps/jq/src/decNumber/example5.c +36 -0
  349. package/deps/jq/src/decNumber/example6.c +61 -0
  350. package/deps/jq/src/decNumber/example7.c +35 -0
  351. package/deps/jq/src/decNumber/example8.c +39 -0
  352. package/deps/jq/src/decNumber/readme.txt +81 -0
  353. package/deps/jq/src/exec_stack.h +5 -3
  354. package/deps/jq/src/execute.c +126 -44
  355. package/deps/jq/src/inject_errors.c +0 -2
  356. package/deps/jq/src/jq.h +10 -1
  357. package/deps/jq/src/jq_test.c +222 -11
  358. package/deps/jq/src/jv.c +807 -176
  359. package/deps/jq/src/jv.h +22 -1
  360. package/deps/jq/src/jv_alloc.c +33 -26
  361. package/deps/jq/src/jv_alloc.h +0 -11
  362. package/deps/jq/src/jv_aux.c +153 -67
  363. package/deps/jq/src/jv_dtoa.c +12 -2
  364. package/deps/jq/src/jv_dtoa_tsd.c +51 -0
  365. package/deps/jq/src/jv_dtoa_tsd.h +4 -0
  366. package/deps/jq/src/jv_parse.c +70 -15
  367. package/deps/jq/src/jv_print.c +56 -60
  368. package/deps/jq/src/jv_private.h +7 -0
  369. package/deps/jq/src/jv_thread.h +76 -0
  370. package/deps/jq/src/jv_unicode.c +18 -0
  371. package/deps/jq/src/jv_unicode.h +2 -0
  372. package/deps/jq/src/lexer.c +782 -543
  373. package/deps/jq/src/lexer.h +438 -64
  374. package/deps/jq/src/lexer.l +10 -3
  375. package/deps/jq/src/libm.h +16 -6
  376. package/deps/jq/src/linker.c +97 -40
  377. package/deps/jq/src/locfile.c +2 -1
  378. package/deps/jq/src/main.c +384 -336
  379. package/deps/jq/src/opcode_list.h +5 -2
  380. package/deps/jq/src/parser.c +2260 -1898
  381. package/deps/jq/src/parser.h +115 -98
  382. package/deps/jq/src/parser.y +124 -89
  383. package/deps/jq/src/util.c +854 -55
  384. package/deps/jq/src/util.h +6 -4
  385. package/deps/jq/tests/jq.test +762 -26
  386. package/deps/jq/tests/jq_fuzz_compile.c +27 -0
  387. package/deps/jq/tests/jq_fuzz_execute.cpp +42 -0
  388. package/deps/jq/tests/jq_fuzz_fixed.cpp +297 -0
  389. package/deps/jq/tests/jq_fuzz_load_file.c +28 -0
  390. package/deps/jq/tests/jq_fuzz_parse.c +21 -0
  391. package/deps/jq/tests/jq_fuzz_parse_extended.c +36 -0
  392. package/deps/jq/tests/jq_fuzz_parse_stream.c +21 -0
  393. package/deps/jq/tests/local.supp +14 -0
  394. package/deps/jq/tests/man.test +979 -0
  395. package/deps/jq/tests/manonig.test +76 -0
  396. package/deps/jq/tests/manonigtest +5 -0
  397. package/deps/jq/tests/mantest +1 -2
  398. package/deps/jq/tests/modules/home2/.jq/g.jq +1 -0
  399. package/deps/jq/tests/modules/shadow1.jq +2 -0
  400. package/deps/jq/tests/modules/shadow2.jq +1 -0
  401. package/deps/jq/tests/modules/test_bind_order0.jq +1 -0
  402. package/deps/jq/tests/modules/test_bind_order1.jq +1 -1
  403. package/deps/jq/tests/modules/test_bind_order2.jq +0 -1
  404. package/deps/jq/tests/no-main-program.jq +1 -0
  405. package/deps/jq/tests/onig.test +77 -2
  406. package/deps/jq/tests/setup +7 -2
  407. package/deps/jq/tests/shtest +478 -59
  408. package/deps/jq/tests/uri.test +38 -0
  409. package/deps/jq/tests/uritest +5 -0
  410. package/deps/jq/tests/yes-main-program.jq +2 -0
  411. package/lib/index.js +3 -0
  412. package/lib/jq.js +15 -1
  413. package/lib/templateAsync.js +137 -0
  414. package/package.json +7 -7
  415. package/src/binding.cc +623 -146
  416. package/src/binding.h +3 -4
  417. package/test/santiy-async.test.js +171 -0
  418. package/test/santiy.test.js +2 -2
  419. package/test/template-async.test.js +182 -0
  420. package/test/template.test.js +3 -3
  421. package/deps/jq/.travis.yml +0 -202
  422. package/deps/jq/NEWS +0 -89
  423. package/deps/jq/appveyor.yml +0 -53
  424. package/deps/jq/docs/Gemfile +0 -7
  425. package/deps/jq/docs/Gemfile.lock +0 -63
  426. package/deps/jq/docs/Rakefile +0 -24
  427. package/deps/jq/docs/Rakefile.manual +0 -49
  428. package/deps/jq/docs/Rakefile.website +0 -76
  429. package/deps/jq/docs/content/1.tutorial/default.yml +0 -327
  430. package/deps/jq/docs/content/2.download/default.yml +0 -193
  431. package/deps/jq/docs/content/index/index.yml +0 -73
  432. package/deps/jq/docs/public/css/base.scss +0 -181
  433. package/deps/jq/docs/public/jq.png +0 -0
  434. package/deps/jq/docs/site.yml +0 -9
  435. package/deps/jq/docs/templates/default.liquid +0 -34
  436. package/deps/jq/docs/templates/index.liquid +0 -73
  437. package/deps/jq/docs/templates/manual.liquid +0 -99
  438. package/deps/jq/docs/templates/shared/_footer.liquid +0 -10
  439. package/deps/jq/docs/templates/shared/_head.liquid +0 -17
  440. package/deps/jq/docs/templates/shared/_navbar.liquid +0 -27
  441. package/deps/jq/modules/oniguruma/README.ja +0 -195
  442. package/deps/jq/modules/oniguruma/cmake/dist.cmake +0 -321
  443. package/deps/jq/modules/oniguruma/contributed/libfuzzer-onig.cpp +0 -31
  444. package/deps/jq/modules/oniguruma/dist.info +0 -10
  445. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold1_key.c +0 -2250
  446. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold2_key.c +0 -203
  447. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold3_key.c +0 -113
  448. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold_data.c +0 -1225
  449. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data.c +0 -24742
  450. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data_posix.c +0 -4846
  451. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_unfold_key.c +0 -2571
  452. /package/deps/jq/sig/{jq-release.key → jq-release-old.key} +0 -0
  453. /package/deps/jq/tests/modules/{.jq → home1/.jq} +0 -0
@@ -0,0 +1,613 @@
1
+ /*
2
+ * testp.c
3
+ * Copyright (c) 2020-2021 K.Kosako
4
+ */
5
+ #include <stdio.h>
6
+ #include <string.h>
7
+
8
+ #include "onigposix.h"
9
+
10
+ #define SLEN(s) strlen(s)
11
+
12
+ static int nsucc = 0;
13
+ static int nfail = 0;
14
+ static int nerror = 0;
15
+
16
+ static FILE* err_file;
17
+
18
+ static void
19
+ xx(char* pattern, char* str, int from, int to, int mem, int not)
20
+ {
21
+ int r;
22
+ regex_t reg;
23
+ char buf[200];
24
+ regmatch_t pmatch[25];
25
+
26
+ r = regcomp(&reg, pattern, REG_EXTENDED | REG_NEWLINE);
27
+ if (r) {
28
+ regerror(r, &reg, buf, sizeof(buf));
29
+ fprintf(err_file, "ERROR: %s\n", buf);
30
+ nerror++;
31
+ return ;
32
+ }
33
+
34
+ r = regexec(&reg, str, reg.re_nsub + 1, pmatch, 0);
35
+ if (r != 0 && r != REG_NOMATCH) {
36
+ regerror(r, &reg, buf, sizeof(buf));
37
+ fprintf(err_file, "ERROR: %s\n", buf);
38
+ nerror++;
39
+ return ;
40
+ }
41
+
42
+ if (r == REG_NOMATCH) {
43
+ if (not) {
44
+ fprintf(stdout, "OK(N): /%s/ '%s'\n", pattern, str);
45
+ nsucc++;
46
+ }
47
+ else {
48
+ fprintf(stdout, "FAIL: /%s/ '%s'\n", pattern, str);
49
+ nfail++;
50
+ }
51
+ }
52
+ else {
53
+ if (not) {
54
+ fprintf(stdout, "FAIL(N): /%s/ '%s'\n", pattern, str);
55
+ nfail++;
56
+ }
57
+ else {
58
+ if (pmatch[mem].rm_so == from && pmatch[mem].rm_eo == to) {
59
+ fprintf(stdout, "OK: /%s/ '%s'\n", pattern, str);
60
+ nsucc++;
61
+ }
62
+ else {
63
+ fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str,
64
+ from, to, pmatch[mem].rm_so, pmatch[mem].rm_eo);
65
+ nfail++;
66
+ }
67
+ }
68
+ }
69
+ regfree(&reg);
70
+ }
71
+
72
+ static void x2(char* pattern, char* str, int from, int to)
73
+ {
74
+ xx(pattern, str, from, to, 0, 0);
75
+ }
76
+
77
+ static void x3(char* pattern, char* str, int from, int to, int mem)
78
+ {
79
+ xx(pattern, str, from, to, mem, 0);
80
+ }
81
+
82
+ static void n(char* pattern, char* str)
83
+ {
84
+ xx(pattern, str, 0, 0, 0, 1);
85
+ }
86
+
87
+ extern int main(int argc, char* argv[])
88
+ {
89
+ err_file = stdout;
90
+
91
+ reg_set_encoding(REG_POSIX_ENCODING_UTF8);
92
+
93
+ x2("", "", 0, 0);
94
+ x2("^", "", 0, 0);
95
+ x2("$", "", 0, 0);
96
+ x2("\\G", "", 0, 0);
97
+ x2("\\A", "", 0, 0);
98
+ x2("\\Z", "", 0, 0);
99
+ x2("\\z", "", 0, 0);
100
+ x2("^$", "", 0, 0);
101
+ x2("\\ca", "\001", 0, 1);
102
+ x2("\\C-b", "\002", 0, 1);
103
+ x2("\\c\\\\", "\034", 0, 1);
104
+ x2("q[\\c\\\\]", "q\034", 0, 2);
105
+ x2("", "a", 0, 0);
106
+ x2("a", "a", 0, 1);
107
+ x2("\\x61", "a", 0, 1);
108
+ x2("aa", "aa", 0, 2);
109
+ x2("aaa", "aaa", 0, 3);
110
+ x2("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 0, 35);
111
+ x2("ab", "ab", 0, 2);
112
+ x2("b", "ab", 1, 2);
113
+ x2("bc", "abc", 1, 3);
114
+ x2("(?i:#RET#)", "#INS##RET#", 5, 10);
115
+ x2("\\17", "\017", 0, 1);
116
+ x2("\\x1f", "\x1f", 0, 1);
117
+ x2("a(?#....\\\\JJJJ)b", "ab", 0, 2);
118
+ x2("(?x) G (o O(?-x)oO) g L", "GoOoOgLe", 0, 7);
119
+ x2(".", "a", 0, 1);
120
+ n(".", "");
121
+ x2("..", "ab", 0, 2);
122
+ x2("\\w", "e", 0, 1);
123
+ n("\\W", "e");
124
+ x2("\\s", " ", 0, 1);
125
+ x2("\\S", "b", 0, 1);
126
+ x2("\\d", "4", 0, 1);
127
+ n("\\D", "4");
128
+ x2("\\b", "z ", 0, 0);
129
+ x2("\\b", " z", 1, 1);
130
+ x2("\\B", "zz ", 1, 1);
131
+ x2("\\B", "z ", 2, 2);
132
+ x2("\\B", " z", 0, 0);
133
+ x2("[ab]", "b", 0, 1);
134
+ n("[ab]", "c");
135
+ x2("[a-z]", "t", 0, 1);
136
+ n("[^a]", "a");
137
+ x2("[^a]", "\n", 0, 1);
138
+ x2("[]]", "]", 0, 1);
139
+ n("[^]]", "]");
140
+ x2("[\\^]+", "0^^1", 1, 3);
141
+ x2("[b-]", "b", 0, 1);
142
+ x2("[b-]", "-", 0, 1);
143
+ x2("[\\w]", "z", 0, 1);
144
+ n("[\\w]", " ");
145
+ x2("[\\W]", "b$", 1, 2);
146
+ x2("[\\d]", "5", 0, 1);
147
+ n("[\\d]", "e");
148
+ x2("[\\D]", "t", 0, 1);
149
+ n("[\\D]", "3");
150
+ x2("[\\s]", " ", 0, 1);
151
+ n("[\\s]", "a");
152
+ x2("[\\S]", "b", 0, 1);
153
+ n("[\\S]", " ");
154
+ x2("[\\w\\d]", "2", 0, 1);
155
+ n("[\\w\\d]", " ");
156
+ x2("[[:upper:]]", "B", 0, 1);
157
+ x2("[*[:xdigit:]+]", "+", 0, 1);
158
+ x2("[*[:xdigit:]+]", "GHIKK-9+*", 6, 7);
159
+ x2("[*[:xdigit:]+]", "-@^+", 3, 4);
160
+ n("[[:upper]]", "A");
161
+ x2("[[:upper]]", ":", 0, 1);
162
+ x2("[\\044-\\047]", "\046", 0, 1);
163
+ x2("[\\x5a-\\x5c]", "\x5b", 0, 1);
164
+ x2("[\\x6A-\\x6D]", "\x6c", 0, 1);
165
+ n("[\\x6A-\\x6D]", "\x6E");
166
+ n("^[0-9A-F]+ 0+ UNDEF ", "75F 00000000 SECT14A notype () External | _rb_apply");
167
+ x2("[\\[]", "[", 0, 1);
168
+ x2("[\\]]", "]", 0, 1);
169
+ x2("[&]", "&", 0, 1);
170
+ x2("[[ab]]", "b", 0, 1);
171
+ x2("[[ab]c]", "c", 0, 1);
172
+ n("[[^a]]", "a");
173
+ n("[^[a]]", "a");
174
+ x2("[[ab]&&bc]", "b", 0, 1);
175
+ n("[[ab]&&bc]", "a");
176
+ n("[[ab]&&bc]", "c");
177
+ x2("[a-z&&b-y&&c-x]", "w", 0, 1);
178
+ n("[^a-z&&b-y&&c-x]", "w");
179
+ x2("[[^a&&a]&&a-z]", "b", 0, 1);
180
+ n("[[^a&&a]&&a-z]", "a");
181
+ x2("[[^a-z&&bcdef]&&[^c-g]]", "h", 0, 1);
182
+ n("[[^a-z&&bcdef]&&[^c-g]]", "c");
183
+ x2("[^[^abc]&&[^cde]]", "c", 0, 1);
184
+ x2("[^[^abc]&&[^cde]]", "e", 0, 1);
185
+ n("[^[^abc]&&[^cde]]", "f");
186
+ x2("[a-&&-a]", "-", 0, 1);
187
+ n("[a\\-&&\\-a]", "&");
188
+ n("\\wabc", " abc");
189
+ x2("a\\Wbc", "a bc", 0, 4);
190
+ x2("a.b.c", "aabbc", 0, 5);
191
+ x2(".\\wb\\W..c", "abb bcc", 0, 7);
192
+ x2("\\s\\wzzz", " zzzz", 0, 5);
193
+ x2("aa.b", "aabb", 0, 4);
194
+ n(".a", "ab");
195
+ x2(".a", "aa", 0, 2);
196
+ x2("^a", "a", 0, 1);
197
+ x2("^a$", "a", 0, 1);
198
+ x2("^\\w$", "a", 0, 1);
199
+ n("^\\w$", " ");
200
+ x2("^\\wab$", "zab", 0, 3);
201
+ x2("^\\wabcdef$", "zabcdef", 0, 7);
202
+ x2("^\\w...def$", "zabcdef", 0, 7);
203
+ x2("\\w\\w\\s\\Waaa\\d", "aa aaa4", 0, 8);
204
+ x2("\\A\\Z", "", 0, 0);
205
+ x2("\\Axyz", "xyz", 0, 3);
206
+ x2("xyz\\Z", "xyz", 0, 3);
207
+ x2("xyz\\z", "xyz", 0, 3);
208
+ x2("a\\Z", "a", 0, 1);
209
+ x2("\\Gaz", "az", 0, 2);
210
+ n("\\Gz", "bza");
211
+ n("az\\G", "az");
212
+ n("az\\A", "az");
213
+ n("a\\Az", "az");
214
+ x2("\\^\\$", "^$", 0, 2);
215
+ x2("^x?y", "xy", 0, 2);
216
+ x2("^(x?y)", "xy", 0, 2);
217
+ x2("\\w", "_", 0, 1);
218
+ n("\\W", "_");
219
+ x2("(?=z)z", "z", 0, 1);
220
+ n("(?=z).", "a");
221
+ x2("(?!z)a", "a", 0, 1);
222
+ n("(?!z)a", "z");
223
+ x2("(?i:a)", "a", 0, 1);
224
+ x2("(?i:a)", "A", 0, 1);
225
+ x2("(?i:A)", "a", 0, 1);
226
+ n("(?i:A)", "b");
227
+ x2("(?i:[A-Z])", "a", 0, 1);
228
+ x2("(?i:[f-m])", "H", 0, 1);
229
+ x2("(?i:[f-m])", "h", 0, 1);
230
+ n("(?i:[f-m])", "e");
231
+ x2("(?i:[A-c])", "D", 0, 1);
232
+ n("(?i:[^a-z])", "A");
233
+ n("(?i:[^a-z])", "a");
234
+ x2("(?i:[!-k])", "Z", 0, 1);
235
+ x2("(?i:[!-k])", "7", 0, 1);
236
+ x2("(?i:[T-}])", "b", 0, 1);
237
+ x2("(?i:[T-}])", "{", 0, 1);
238
+ x2("(?i:\\?a)", "?A", 0, 2);
239
+ x2("(?i:\\*A)", "*a", 0, 2);
240
+ n(".", "\n");
241
+ x2("(?m:.)", "\n", 0, 1);
242
+ x2("(?m:a.)", "a\n", 0, 2);
243
+ x2("(?m:.b)", "a\nb", 1, 3);
244
+ x2(".*abc", "dddabdd\nddabc", 8, 13);
245
+ x2("(?m:.*abc)", "dddabddabc", 0, 10);
246
+ n("(?i)(?-i)a", "A");
247
+ n("(?i)(?-i:a)", "A");
248
+ x2("a?", "", 0, 0);
249
+ x2("a?", "b", 0, 0);
250
+ x2("a?", "a", 0, 1);
251
+ x2("a*", "", 0, 0);
252
+ x2("a*", "a", 0, 1);
253
+ x2("a*", "aaa", 0, 3);
254
+ x2("a*", "baaaa", 0, 0);
255
+ n("a+", "");
256
+ x2("a+", "a", 0, 1);
257
+ x2("a+", "aaaa", 0, 4);
258
+ x2("a+", "aabbb", 0, 2);
259
+ x2("a+", "baaaa", 1, 5);
260
+ x2(".?", "", 0, 0);
261
+ x2(".?", "f", 0, 1);
262
+ x2(".?", "\n", 0, 0);
263
+ x2(".*", "", 0, 0);
264
+ x2(".*", "abcde", 0, 5);
265
+ x2(".+", "z", 0, 1);
266
+ x2(".+", "zdswer\n", 0, 6);
267
+ x2("(.*)a\\1f", "babfbac", 0, 4);
268
+ x2("(.*)a\\1f", "bacbabf", 3, 7);
269
+ x2("((.*)a\\2f)", "bacbabf", 3, 7);
270
+ x2("(.*)a\\1f", "baczzzzzz\nbazz\nzzzzbabf", 19, 23);
271
+ x2("a|b", "a", 0, 1);
272
+ x2("a|b", "b", 0, 1);
273
+ x2("|a", "a", 0, 0);
274
+ x2("(|a)", "a", 0, 0);
275
+ x2("ab|bc", "ab", 0, 2);
276
+ x2("ab|bc", "bc", 0, 2);
277
+ x2("z(?:ab|bc)", "zbc", 0, 3);
278
+ x2("a(?:ab|bc)c", "aabc", 0, 4);
279
+ x2("ab|(?:ac|az)", "az", 0, 2);
280
+ x2("a|b|c", "dc", 1, 2);
281
+ x2("a|b|cd|efg|h|ijk|lmn|o|pq|rstuvwx|yz", "pqr", 0, 2);
282
+ n("a|b|cd|efg|h|ijk|lmn|o|pq|rstuvwx|yz", "mn");
283
+ x2("a|^z", "ba", 1, 2);
284
+ x2("a|^z", "za", 0, 1);
285
+ x2("a|\\Gz", "bza", 2, 3);
286
+ x2("a|\\Gz", "za", 0, 1);
287
+ x2("a|\\Az", "bza", 2, 3);
288
+ x2("a|\\Az", "za", 0, 1);
289
+ x2("a|b\\Z", "ba", 1, 2);
290
+ x2("a|b\\Z", "b", 0, 1);
291
+ x2("a|b\\z", "ba", 1, 2);
292
+ x2("a|b\\z", "b", 0, 1);
293
+ x2("\\w|\\s", " ", 0, 1);
294
+ n("\\w|\\w", " ");
295
+ x2("\\w|%", "%", 0, 1);
296
+ x2("\\w|[&$]", "&", 0, 1);
297
+ x2("[b-d]|[^e-z]", "a", 0, 1);
298
+ x2("(?:a|[c-f])|bz", "dz", 0, 1);
299
+ x2("(?:a|[c-f])|bz", "bz", 0, 2);
300
+ x2("abc|(?=zz)..f", "zzf", 0, 3);
301
+ x2("abc|(?!zz)..f", "abf", 0, 3);
302
+ x2("(?=za)..a|(?=zz)..a", "zza", 0, 3);
303
+ n("(?>a|abd)c", "abdc");
304
+ x2("(?>abd|a)c", "abdc", 0, 4);
305
+ x2("a?|b", "a", 0, 1);
306
+ x2("a?|b", "b", 0, 0);
307
+ x2("a?|b", "", 0, 0);
308
+ x2("a*|b", "aa", 0, 2);
309
+ x2("a*|b*", "ba", 0, 0);
310
+ x2("a*|b*", "ab", 0, 1);
311
+ x2("a+|b*", "", 0, 0);
312
+ x2("a+|b*", "bbb", 0, 3);
313
+ x2("a+|b*", "abbb", 0, 1);
314
+ n("a+|b+", "");
315
+ x2("(a|b)?", "b", 0, 1);
316
+ x2("(a|b)*", "ba", 0, 2);
317
+ x2("(a|b)+", "bab", 0, 3);
318
+ x2("(ab|ca)+", "caabbc", 0, 4);
319
+ x2("(ab|ca)+", "aabca", 1, 5);
320
+ x2("(ab|ca)+", "abzca", 0, 2);
321
+ x2("(a|bab)+", "ababa", 0, 5);
322
+ x2("(a|bab)+", "ba", 1, 2);
323
+ x2("(a|bab)+", "baaaba", 1, 4);
324
+ x2("(?:a|b)(?:a|b)", "ab", 0, 2);
325
+ x2("(?:a*|b*)(?:a*|b*)", "aaabbb", 0, 3);
326
+ x2("(?:a*|b*)(?:a+|b+)", "aaabbb", 0, 6);
327
+ x2("(?:a+|b+){2}", "aaabbb", 0, 6);
328
+ x2("h{0,}", "hhhh", 0, 4);
329
+ x2("(?:a+|b+){1,2}", "aaabbb", 0, 6);
330
+ n("ax{2}*a", "0axxxa1");
331
+ n("a.{0,2}a", "0aXXXa0");
332
+ n("a.{0,2}?a", "0aXXXa0");
333
+ n("a.{0,2}?a", "0aXXXXa0");
334
+ x2("^a{2,}?a$", "aaa", 0, 3);
335
+ x2("^[a-z]{2,}?$", "aaa", 0, 3);
336
+ x2("(?:a+|\\Ab*)cc", "cc", 0, 2);
337
+ n("(?:a+|\\Ab*)cc", "abcc");
338
+ x2("(?:^a+|b+)*c", "aabbbabc", 6, 8);
339
+ x2("(?:^a+|b+)*c", "aabbbbc", 0, 7);
340
+ x2("a|(?i)c", "C", 0, 1);
341
+ x2("(?i)c|a", "C", 0, 1);
342
+ x2("(?i)c|a", "A", 0, 1);
343
+ x2("(?i:c)|a", "C", 0, 1);
344
+ n("(?i:c)|a", "A");
345
+ x2("[abc]?", "abc", 0, 1);
346
+ x2("[abc]*", "abc", 0, 3);
347
+ x2("[^abc]*", "abc", 0, 0);
348
+ n("[^abc]+", "abc");
349
+ x2("a?\?", "aaa", 0, 0);
350
+ x2("ba?\?b", "bab", 0, 3);
351
+ x2("a*?", "aaa", 0, 0);
352
+ x2("ba*?", "baa", 0, 1);
353
+ x2("ba*?b", "baab", 0, 4);
354
+ x2("a+?", "aaa", 0, 1);
355
+ x2("ba+?", "baa", 0, 2);
356
+ x2("ba+?b", "baab", 0, 4);
357
+ x2("(?:a?)?\?", "a", 0, 0);
358
+ x2("(?:a?\?)?", "a", 0, 0);
359
+ x2("(?:a?)+?", "aaa", 0, 1);
360
+ x2("(?:a+)?\?", "aaa", 0, 0);
361
+ x2("(?:a+)?\?b", "aaab", 0, 4);
362
+ x2("(?:ab)?{2}", "", 0, 0);
363
+ x2("(?:ab)?{2}", "ababa", 0, 4);
364
+ x2("(?:ab)*{0}", "ababa", 0, 0);
365
+ x2("(?:ab){3,}", "abababab", 0, 8);
366
+ n("(?:ab){3,}", "abab");
367
+ x2("(?:ab){2,4}", "ababab", 0, 6);
368
+ x2("(?:ab){2,4}", "ababababab", 0, 8);
369
+ x2("(?:ab){2,4}?", "ababababab", 0, 4);
370
+ x2("(?:ab){,}", "ab{,}", 0, 5);
371
+ x2("(?:abc)+?{2}", "abcabcabc", 0, 6);
372
+ x2("(?:X*)(?i:xa)", "XXXa", 0, 4);
373
+ x2("(d+)([^abc]z)", "dddz", 0, 4);
374
+ x2("([^abc]*)([^abc]z)", "dddz", 0, 4);
375
+ x2("(\\w+)(\\wz)", "dddz", 0, 4);
376
+ x3("(a)", "a", 0, 1, 1);
377
+ x3("(ab)", "ab", 0, 2, 1);
378
+ x2("((ab))", "ab", 0, 2);
379
+ x3("((ab))", "ab", 0, 2, 1);
380
+ x3("((ab))", "ab", 0, 2, 2);
381
+ x3("((((((((((((((((((((ab))))))))))))))))))))", "ab", 0, 2, 20);
382
+ x3("(ab)(cd)", "abcd", 0, 2, 1);
383
+ x3("(ab)(cd)", "abcd", 2, 4, 2);
384
+ x3("()(a)bc(def)ghijk", "abcdefghijk", 3, 6, 3);
385
+ x3("(()(a)bc(def)ghijk)", "abcdefghijk", 3, 6, 4);
386
+ x2("(^a)", "a", 0, 1);
387
+ x3("(a)|(a)", "ba", 1, 2, 1);
388
+ x3("(^a)|(a)", "ba", 1, 2, 2);
389
+ x3("(a?)", "aaa", 0, 1, 1);
390
+ x3("(a*)", "aaa", 0, 3, 1);
391
+ x3("(a*)", "", 0, 0, 1);
392
+ x3("(a+)", "aaaaaaa", 0, 7, 1);
393
+ x3("(a+|b*)", "bbbaa", 0, 3, 1);
394
+ x3("(a+|b?)", "bbbaa", 0, 1, 1);
395
+ x3("(abc)?", "abc", 0, 3, 1);
396
+ x3("(abc)*", "abc", 0, 3, 1);
397
+ x3("(abc)+", "abc", 0, 3, 1);
398
+ x3("(xyz|abc)+", "abc", 0, 3, 1);
399
+ x3("([xyz][abc]|abc)+", "abc", 0, 3, 1);
400
+ x3("((?i:abc))", "AbC", 0, 3, 1);
401
+ x2("(abc)(?i:\\1)", "abcABC", 0, 6);
402
+ x3("((?m:a.c))", "a\nc", 0, 3, 1);
403
+ x3("((?=az)a)", "azb", 0, 1, 1);
404
+ x3("abc|(.abd)", "zabd", 0, 4, 1);
405
+ x2("(?:abc)|(ABC)", "abc", 0, 3);
406
+ x3("(?i:(abc))|(zzz)", "ABC", 0, 3, 1);
407
+ x3("a*(.)", "aaaaz", 4, 5, 1);
408
+ x3("a*?(.)", "aaaaz", 0, 1, 1);
409
+ x3("a*?(c)", "aaaac", 4, 5, 1);
410
+ x3("[bcd]a*(.)", "caaaaz", 5, 6, 1);
411
+ x3("(\\Abb)cc", "bbcc", 0, 2, 1);
412
+ n("(\\Abb)cc", "zbbcc");
413
+ x3("(^bb)cc", "bbcc", 0, 2, 1);
414
+ n("(^bb)cc", "zbbcc");
415
+ x3("cc(bb$)", "ccbb", 2, 4, 1);
416
+ n("cc(bb$)", "ccbbb");
417
+ n("(\\1)", "");
418
+ n("\\1(a)", "aa");
419
+ n("(a(b)\\1)\\2+", "ababb");
420
+ n("(?:(?:\\1|z)(a))+$", "zaa");
421
+ x2("(?:(?:\\1|z)(a))+$", "zaaa", 0, 4);
422
+ x2("(a)(?=\\1)", "aa", 0, 1);
423
+ n("(a)$|\\1", "az");
424
+ x2("(a)\\1", "aa", 0, 2);
425
+ n("(a)\\1", "ab");
426
+ x2("(a?)\\1", "aa", 0, 2);
427
+ x2("(a?\?)\\1", "aa", 0, 0);
428
+ x2("(a*)\\1", "aaaaa", 0, 4);
429
+ x3("(a*)\\1", "aaaaa", 0, 2, 1);
430
+ x2("a(b*)\\1", "abbbb", 0, 5);
431
+ x2("a(b*)\\1", "ab", 0, 1);
432
+ x2("(a*)(b*)\\1\\2", "aaabbaaabb", 0, 10);
433
+ x2("(a*)(b*)\\2", "aaabbbb", 0, 7);
434
+ x2("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 8);
435
+ x3("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 3, 7);
436
+ x2("(a)(b)(c)\\2\\1\\3", "abcbac", 0, 6);
437
+ x2("([a-d])\\1", "cc", 0, 2);
438
+ x2("(\\w\\d\\s)\\1", "f5 f5 ", 0, 6);
439
+ n("(\\w\\d\\s)\\1", "f5 f5");
440
+ x2("(who|[a-c]{3})\\1", "whowho", 0, 6);
441
+ x2("...(who|[a-c]{3})\\1", "abcwhowho", 0, 9);
442
+ x2("(who|[a-c]{3})\\1", "cbccbc", 0, 6);
443
+ x2("(^a)\\1", "aa", 0, 2);
444
+ n("(^a)\\1", "baa");
445
+ n("(a$)\\1", "aa");
446
+ n("(ab\\Z)\\1", "ab");
447
+ x2("(a*\\Z)\\1", "a", 1, 1);
448
+ x2(".(a*\\Z)\\1", "ba", 1, 2);
449
+ x3("(.(abc)\\2)", "zabcabc", 0, 7, 1);
450
+ x3("(.(..\\d.)\\2)", "z12341234", 0, 9, 1);
451
+ x2("((?i:az))\\1", "AzAz", 0, 4);
452
+ n("((?i:az))\\1", "Azaz");
453
+ x2("(?<=a)b", "ab", 1, 2);
454
+ n("(?<=a)b", "bb");
455
+ x2("(?<=a|b)b", "bb", 1, 2);
456
+ x2("(?<=a|bc)b", "bcb", 2, 3);
457
+ x2("(?<=a|bc)b", "ab", 1, 2);
458
+ x2("(?<=a|bc||defghij|klmnopq|r)z", "rz", 1, 2);
459
+ x2("(a)\\g<1>", "aa", 0, 2);
460
+ x2("(?<!a)b", "cb", 1, 2);
461
+ n("(?<!a)b", "ab");
462
+ x2("(?<!a|bc)b", "bbb", 0, 1);
463
+ n("(?<!a|bc)z", "bcz");
464
+ x2("(?<name1>a)", "a", 0, 1);
465
+ x2("(?<name_2>ab)\\g<name_2>", "abab", 0, 4);
466
+ x2("(?<name_3>.zv.)\\k<name_3>", "azvbazvb", 0, 8);
467
+ x2("(?<=\\g<ab>)|-\\zEND (?<ab>XyZ)", "XyZ", 3, 3);
468
+ x2("(?<n>|a\\g<n>)+", "", 0, 0);
469
+ x2("(?<n>|\\(\\g<n>\\))+$", "()(())", 0, 6);
470
+ x3("\\g<n>(?<n>.){0}", "X", 0, 1, 1);
471
+ x2("\\g<n>(abc|df(?<n>.YZ){2,8}){0}", "XYZ", 0, 3);
472
+ x2("\\A(?<n>(a\\g<n>)|)\\z", "aaaa", 0, 4);
473
+ x2("(?<n>|\\g<m>\\g<n>)\\z|\\zEND (?<m>a|(b)\\g<m>)", "bbbbabba", 0, 8);
474
+ x2("(?<name1240>\\w+\\sx)a+\\k<name1240>", " fg xaaaaaaaafg x", 2, 18);
475
+ x3("(z)()()(?<_9>a)\\g<_9>", "zaa", 2, 3, 1);
476
+ x2("(.)(((?<_>a)))\\k<_>", "zaa", 0, 3);
477
+ x2("((?<name1>\\d)|(?<name2>\\w))(\\k<name1>|\\k<name2>)", "ff", 0, 2);
478
+ x2("(?:(?<x>)|(?<x>efg))\\k<x>", "", 0, 0);
479
+ x2("(?:(?<x>abc)|(?<x>efg))\\k<x>", "abcefgefg", 3, 9);
480
+ n("(?:(?<x>abc)|(?<x>efg))\\k<x>", "abcefg");
481
+ x2("(?:(?<n1>.)|(?<n1>..)|(?<n1>...)|(?<n1>....)|(?<n1>.....)|(?<n1>......)|(?<n1>.......)|(?<n1>........)|(?<n1>.........)|(?<n1>..........)|(?<n1>...........)|(?<n1>............)|(?<n1>.............)|(?<n1>..............))\\k<n1>$", "a-pyumpyum", 2, 10);
482
+ x3("(?:(?<n1>.)|(?<n1>..)|(?<n1>...)|(?<n1>....)|(?<n1>.....)|(?<n1>......)|(?<n1>.......)|(?<n1>........)|(?<n1>.........)|(?<n1>..........)|(?<n1>...........)|(?<n1>............)|(?<n1>.............)|(?<n1>..............))\\k<n1>$", "xxxxabcdefghijklmnabcdefghijklmn", 4, 18, 14);
483
+ x3("(?<name1>)(?<name2>)(?<name3>)(?<name4>)(?<name5>)(?<name6>)(?<name7>)(?<name8>)(?<name9>)(?<name10>)(?<name11>)(?<name12>)(?<name13>)(?<name14>)(?<name15>)(?<name16>aaa)(?<name17>)$", "aaa", 0, 3, 16);
484
+ x2("(?<foo>a|\\(\\g<foo>\\))", "a", 0, 1);
485
+ x2("(?<foo>a|\\(\\g<foo>\\))", "((((((a))))))", 0, 13);
486
+ x3("(?<foo>a|\\(\\g<foo>\\))", "((((((((a))))))))", 0, 17, 1);
487
+ x2("\\g<bar>|\\zEND(?<bar>.*abc$)", "abcxxxabc", 0, 9);
488
+ x2("\\g<1>|\\zEND(.a.)", "bac", 0, 3);
489
+ x3("\\g<_A>\\g<_A>|\\zEND(.a.)(?<_A>.b.)", "xbxyby", 3, 6, 1);
490
+ x2("\\A(?:\\g<pon>|\\g<pan>|\\zEND (?<pan>a|c\\g<pon>c)(?<pon>b|d\\g<pan>d))$", "cdcbcdc", 0, 7);
491
+ x2("\\A(?<n>|a\\g<m>)\\z|\\zEND (?<m>\\g<n>)", "aaaa", 0, 4);
492
+ x2("(?<n>(a|b\\g<n>c){3,5})", "baaaaca", 1, 5);
493
+ x2("(?<n>(a|b\\g<n>c){3,5})", "baaaacaaaaa", 0, 10);
494
+ x2("(?<pare>\\(([^\\(\\)]++|\\g<pare>)*+\\))", "((a))", 0, 5);
495
+ x2("()*\\1", "", 0, 0);
496
+ x2("(?:()|())*\\1\\2", "", 0, 0);
497
+ x3("(?:\\1a|())*", "a", 0, 0, 1);
498
+ x2("x((.)*)*x", "0x1x2x3", 1, 6);
499
+ x2("x((.)*)*x(?i:\\1)\\Z", "0x1x2x1X2", 1, 9);
500
+ x2("(?:()|()|()|()|()|())*\\2\\5", "", 0, 0);
501
+ x2("(?:()|()|()|(x)|()|())*\\2b\\5", "b", 0, 1);
502
+ x2("[0-9-a]", "-", 0, 1); // PR#44
503
+ n("[0-9-a]", ":"); // PR#44
504
+ x3("(\\(((?:[^(]|\\g<1>)*)\\))", "(abc)(abc)", 1, 4, 2); // PR#43
505
+ x2("\\o{101}", "A", 0, 1);
506
+ x2("(?:\\k'+1'B|(A)C)*", "ACAB", 0, 4); // relative backref by postitive number
507
+ x2("\\g<+2>(abc)(ABC){0}", "ABCabc", 0, 6); // relative call by positive number
508
+ x2("A\\g'0'|B()", "AAAAB", 0, 5);
509
+ x3("(A\\g'0')|B", "AAAAB", 0, 5, 1);
510
+ x2("(a*)(?(1))aa", "aaaaa", 0, 5);
511
+ x2("(a*)(?(-1))aa", "aaaaa", 0, 5);
512
+ x2("(?<name>aaa)(?('name'))aa", "aaaaa", 0, 5);
513
+ x2("(a)(?(1)aa|bb)a", "aaaaa", 0, 4);
514
+ x2("(?:aa|())(?(<1>)aa|bb)a", "aabba", 0, 5);
515
+ x2("(?:aa|())(?('1')aa|bb|cc)a", "aacca", 0, 5);
516
+ x3("(a*)(?(1)aa|a)b", "aaab", 0, 1, 1);
517
+ n("(a)(?(1)a|b)c", "abc");
518
+ x2("(a)(?(1)|)c", "ac", 0, 2);
519
+ n("(?()aaa|bbb)", "bbb");
520
+ x2("(a)(?(1+0)b|c)d", "abd", 0, 3);
521
+ x2("(?:(?'name'a)|(?'name'b))(?('name')c|d)e", "ace", 0, 3);
522
+ x2("(?:(?'name'a)|(?'name'b))(?('name')c|d)e", "bce", 0, 3);
523
+ x2("\\R", "\r\n", 0, 2);
524
+ x2("\\R", "\r", 0, 1);
525
+ x2("\\R", "\n", 0, 1);
526
+ x2("\\R", "\x0b", 0, 1);
527
+ n("\\R\\n", "\r\n");
528
+ x2("\\N", "a", 0, 1);
529
+ n("\\N", "\n");
530
+ n("(?m:\\N)", "\n");
531
+ n("(?-m:\\N)", "\n");
532
+ x2("\\O", "a", 0, 1);
533
+ x2("\\O", "\n", 0, 1);
534
+ x2("(?m:\\O)", "\n", 0, 1);
535
+ x2("(?-m:\\O)", "\n", 0, 1);
536
+ x2("\\K", "a", 0, 0);
537
+ x2("a\\K", "a", 1, 1);
538
+ x2("a\\Kb", "ab", 1, 2);
539
+ x2("(a\\Kb|ac\\Kd)", "acd", 2, 3);
540
+ x2("(a\\Kb|\\Kac\\K)*", "acababacab", 9, 10);
541
+
542
+ x2("(?~)", "", 0, 0);
543
+ x2("(?~)", "A", 0, 0);
544
+ x2("aaaaa(?~)", "aaaaaaaaaa", 0, 5);
545
+ x2("(?~(?:|aaa))", "aaa", 0, 0);
546
+ x2("(?~aaa|)", "aaa", 0, 0);
547
+ x2("a(?~(?~)).", "abcdefghijklmnopqrstuvwxyz", 0, 26); // !!!
548
+ x2("/\\*(?~\\*/)\\*/", "/* */ */", 0, 5);
549
+ x2("(?~\\w+)zzzzz", "zzzzz", 0, 5);
550
+ x2("(?~\\w*)zzzzz", "zzzzz", 0, 5);
551
+ x2("(?~A.C|B)", "ABC", 0, 0);
552
+ x2("(?~XYZ|ABC)a", "ABCa", 1, 4);
553
+ x2("(?~XYZ|ABC)a", "aABCa", 0, 1);
554
+ x2("<[^>]*>(?~[<>])</[^>]*>", "<a>vvv</a> <b> </b>", 0, 10);
555
+ x2("(?~ab)", "ccc\ndab", 0, 5);
556
+ x2("(?m:(?~ab))", "ccc\ndab", 0, 5);
557
+ x2("(?-m:(?~ab))", "ccc\ndab", 0, 5);
558
+ x2("(?~abc)xyz", "xyz012345678901234567890123456789abc", 0, 3);
559
+
560
+ // absent with expr
561
+ x2("(?~|78|\\d*)", "123456789", 0, 6);
562
+ x2("(?~|def|(?:abc|de|f){0,100})", "abcdedeabcfdefabc", 0, 11);
563
+ x2("(?~|ab|.*)", "ccc\nddd", 0, 3);
564
+ x2("(?~|ab|\\O*)", "ccc\ndab", 0, 5);
565
+ x2("(?~|ab|\\O{2,10})", "ccc\ndab", 0, 5);
566
+ x2("(?~|ab|\\O{1,10})", "ab", 1, 2);
567
+ n("(?~|ab|\\O{2,10})", "ab");
568
+ x2("(?~|abc|\\O{1,10})", "abc", 1, 3);
569
+ x2("(?~|ab|\\O{5,10})|abc", "abc", 0, 3);
570
+ x2("(?~|ab|\\O{1,10})", "cccccccccccab", 0, 10);
571
+ x2("(?~|aaa|)", "aaa", 0, 0);
572
+ x2("(?~||a*)", "aaaaaa", 0, 0);
573
+ x2("(?~||a*?)", "aaaaaa", 0, 0);
574
+ x2("(a)(?~|b|\\1)", "aaaaaa", 0, 2);
575
+ x2("(a)(?~|bb|(?:a\\1)*)", "aaaaaa", 0, 5);
576
+ x2("(b|c)(?~|abac|(?:a\\1)*)", "abababacabab", 1, 4);
577
+ n("(?~|c|a*+)a", "aaaaa");
578
+ x2("(?~|aaaaa|a*+)", "aaaaa", 0, 0);
579
+ x2("(?~|aaaaaa|a*+)b", "aaaaaab", 1, 7);
580
+ x2("(?~|abcd|(?>))", "zzzabcd", 0, 0);
581
+ x2("(?~|abc|a*?)", "aaaabc", 0, 0);
582
+
583
+ // absent stopper
584
+ x2("(?~|abc)a*", "aaaaaabc", 0, 5);
585
+ x2("(?~|abc)a*z|aaaaaabc", "aaaaaabc", 0, 8);
586
+ x2("(?~|aaaaaa)a*", "aaaaaa", 0, 0);
587
+ x2("(?~|abc)aaaa|aaaabc", "aaaabc", 0, 6);
588
+ x2("(?>(?~|abc))aaaa|aaaabc", "aaaabc", 0, 6);
589
+ x2("(?~|)a", "a", 0, 1);
590
+ n("(?~|a)a", "a");
591
+ x2("(?~|a)(?~|)a", "a", 0, 1);
592
+ x2("(?~|a).*(?~|)a", "bbbbbbbbbbbbbbbbbbbba", 0, 21);
593
+ x2("(?~|abc).*(xyz|pqr)(?~|)abc", "aaaaxyzaaapqrabc", 0, 16);
594
+ x2("(?~|abc).*(xyz|pqr)(?~|)abc", "aaaaxyzaaaabcpqrabc", 11, 19);
595
+ n("\\A(?~|abc).*(xyz|pqrabc)(?~|)abc", "aaaaxyzaaaabcpqrabcabc");
596
+ x2("(?~|a)(?~|)c|ab|a|", "ab", 0, 2);
597
+ x2("(?~|a)((?~|)c|ab|a|)", "ab", 0, 0);
598
+ x2("(?~|a)((?>(?~|))c|ab|a|)", "ab", 0, 0);
599
+
600
+ // extended grapheme cluster
601
+ // CR + LF
602
+ n(".\\y\\O", "\x0d\x0a");
603
+ x2(".\\Y\\O", "\x0d\x0a", 0, 2);
604
+ n("\\X\\X", "\x0d\x0a");
605
+ x2("^\\X$", "\x0d\x0a", 0, 2);
606
+ x2("^\\X\\X\\X$", "ab\x0d\x0a", 0, 4);
607
+
608
+ fprintf(stdout,
609
+ "\nRESULT SUCC: %4d, FAIL: %d, ERROR: %d (by Oniguruma %s)\n",
610
+ nsucc, nfail, nerror, onig_version());
611
+
612
+ return ((nfail == 0 && nerror == 0) ? 0 : -1);
613
+ }