@port-labs/jq-node-bindings 1.0.4 → 1.1.0-dev
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.
- package/.claude/settings.local.json +12 -0
- package/configure +6 -5
- package/deps/jq/.claude/settings.local.json +7 -0
- package/deps/jq/.gitattributes +1 -3
- package/deps/jq/AUTHORS +55 -1
- package/deps/jq/COPYING +40 -0
- package/deps/jq/Makefile.am +40 -36
- package/deps/jq/NEWS.md +277 -2
- package/deps/jq/README.md +23 -5
- package/deps/jq/compile-ios.sh +1 -1
- package/deps/jq/config/m4/check-math-func.m4 +2 -2
- package/deps/jq/config/m4/find-func-no-libs2.m4 +3 -3
- package/deps/jq/configure.ac +10 -18
- package/deps/jq/docs/Pipfile.lock +368 -313
- package/deps/jq/docs/README.md +3 -4
- package/deps/jq/docs/build_manpage.py +1 -1
- package/deps/jq/docs/build_mantests.py +1 -1
- package/deps/jq/docs/build_website.py +1 -8
- package/deps/jq/docs/content/download/default.yml +49 -9
- package/deps/jq/docs/content/index.yml +9 -0
- package/deps/jq/docs/content/manual/{manual.yml → dev/manual.yml} +218 -61
- package/deps/jq/docs/content/manual/v1.3/manual.yml +0 -5
- package/deps/jq/docs/content/manual/v1.4/manual.yml +0 -5
- package/deps/jq/docs/content/manual/v1.5/manual.yml +3 -8
- package/deps/jq/docs/content/manual/v1.6/manual.yml +3 -8
- package/deps/jq/docs/content/manual/v1.7/manual.yml +499 -500
- package/deps/jq/docs/content/manual/v1.8/manual.yml +3858 -0
- package/deps/jq/docs/content/tutorial/default.yml +3 -3
- package/deps/jq/docs/manual_schema.yml +0 -3
- package/deps/jq/docs/public/CNAME +1 -0
- package/deps/jq/docs/templates/index.html.j2 +10 -10
- package/deps/jq/docs/templates/manual.html.j2 +14 -3
- package/deps/jq/docs/templates/shared/_head.html.j2 +8 -3
- package/deps/jq/docs/templates/shared/_navbar.html.j2 +4 -4
- package/deps/jq/jq.1.prebuilt +219 -44
- package/deps/jq/jq.spec +2 -2
- package/deps/jq/libjq.pc.in +1 -1
- package/deps/jq/scripts/version +1 -1
- package/deps/jq/sig/v1.7.1/jq-1.7.1.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-1.7.1.zip.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-osx-amd64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-win64.exe.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.7.1/sha256sum.txt +26 -0
- package/deps/jq/sig/v1.8.0/jq-1.8.0.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-1.8.0.zip.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-linux64.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-osx-amd64.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-win64.exe.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.8.0/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.8.0/sha256sum.txt +26 -0
- package/deps/jq/src/builtin.c +446 -271
- package/deps/jq/src/builtin.jq +25 -60
- package/deps/jq/src/bytecode.h +8 -3
- package/deps/jq/src/compile.c +22 -43
- package/deps/jq/src/compile.h +1 -1
- package/deps/jq/src/execute.c +20 -25
- package/deps/jq/src/jq_test.c +113 -44
- package/deps/jq/src/jv.c +134 -42
- package/deps/jq/src/jv.h +10 -3
- package/deps/jq/src/jv_alloc.c +8 -5
- package/deps/jq/src/jv_alloc.h +0 -1
- package/deps/jq/src/jv_aux.c +41 -8
- package/deps/jq/src/jv_dtoa.c +4 -12
- package/deps/jq/src/jv_dtoa_tsd.c +5 -4
- package/deps/jq/src/jv_dtoa_tsd.h +1 -1
- package/deps/jq/src/jv_parse.c +5 -3
- package/deps/jq/src/jv_print.c +87 -65
- package/deps/jq/src/jv_unicode.c +18 -0
- package/deps/jq/src/jv_unicode.h +2 -0
- package/deps/jq/src/lexer.c +303 -278
- package/deps/jq/src/lexer.h +5 -4
- package/deps/jq/src/lexer.l +8 -2
- package/deps/jq/src/libm.h +15 -5
- package/deps/jq/src/linker.c +6 -4
- package/deps/jq/src/locfile.c +12 -12
- package/deps/jq/src/main.c +204 -270
- package/deps/jq/src/parser.c +1105 -1273
- package/deps/jq/src/parser.y +149 -181
- package/deps/jq/src/util.c +46 -48
- package/deps/jq/src/util.h +1 -1
- package/deps/jq/tests/base64.test +12 -0
- package/deps/jq/tests/jq.test +429 -37
- package/deps/jq/tests/jq_fuzz_load_file.c +1 -0
- package/deps/jq/tests/man.test +46 -13
- package/deps/jq/tests/manonig.test +13 -0
- package/deps/jq/tests/onig.test +40 -2
- package/deps/jq/tests/optional.test +4 -12
- package/deps/jq/tests/setup +5 -1
- package/deps/jq/tests/shtest +358 -130
- package/deps/jq/tests/uri.test +38 -0
- package/deps/jq/tests/uritest +5 -0
- package/deps/jq/{src → vendor}/decNumber/decBasic.c +1 -1
- package/deps/jq/{src → vendor}/decNumber/decCommon.c +1 -1
- package/deps/jq/{src → vendor}/decNumber/decNumber.c +4 -4
- package/deps/jq/{modules → vendor}/oniguruma/CMakeLists.txt +5 -3
- package/deps/jq/{modules → vendor}/oniguruma/HISTORY +45 -7
- package/deps/jq/{modules → vendor}/oniguruma/Makefile.am +1 -1
- package/deps/jq/{modules → vendor}/oniguruma/README.md +10 -23
- package/deps/jq/{modules → vendor}/oniguruma/compile +29 -13
- package/deps/jq/{modules → vendor}/oniguruma/config.guess +91 -27
- package/deps/jq/{modules → vendor}/oniguruma/config.sub +716 -242
- package/deps/jq/{modules → vendor}/oniguruma/configure.ac +2 -2
- package/deps/jq/{modules → vendor}/oniguruma/depcomp +10 -9
- package/deps/jq/{modules → vendor}/oniguruma/doc/API +3 -1
- package/deps/jq/{modules → vendor}/oniguruma/doc/API.ja +3 -1
- package/deps/jq/{modules → vendor}/oniguruma/doc/CALLOUTS.BUILTIN +10 -1
- package/deps/jq/{modules → vendor}/oniguruma/doc/CALLOUTS.BUILTIN.ja +9 -1
- package/deps/jq/{modules → vendor}/oniguruma/doc/RE +12 -13
- package/deps/jq/{modules → vendor}/oniguruma/doc/RE.ja +12 -13
- package/deps/jq/{modules → vendor}/oniguruma/doc/SYNTAX.md +202 -167
- package/deps/jq/{modules → vendor}/oniguruma/doc/UNICODE_PROPERTIES +33 -1
- package/deps/jq/vendor/oniguruma/doc/onig_syn_md.c +667 -0
- package/deps/jq/{modules → vendor}/oniguruma/harnesses/base.c +1 -1
- package/deps/jq/{modules → vendor}/oniguruma/install-sh +9 -9
- package/deps/jq/{modules → vendor}/oniguruma/missing +50 -29
- package/deps/jq/{modules → vendor}/oniguruma/sample/callback_each_match.c +1 -3
- package/deps/jq/vendor/oniguruma/sbom.cdx.json +44 -0
- package/deps/jq/{modules → vendor}/oniguruma/src/ascii.c +4 -1
- package/deps/jq/{modules → vendor}/oniguruma/src/gperf_fold_key_conv.py +4 -4
- package/deps/jq/{modules → vendor}/oniguruma/src/gperf_unfold_key_conv.py +4 -4
- package/deps/jq/vendor/oniguruma/src/make_unicode_egcb.sh +7 -0
- package/deps/jq/{modules → vendor}/oniguruma/src/make_unicode_egcb_data.py +20 -19
- package/deps/jq/{modules → vendor}/oniguruma/src/make_unicode_fold.sh +5 -5
- package/deps/jq/{modules → vendor}/oniguruma/src/make_unicode_fold_data.py +37 -37
- package/deps/jq/{modules → vendor}/oniguruma/src/make_unicode_property.sh +2 -2
- package/deps/jq/{modules → vendor}/oniguruma/src/make_unicode_property_data.py +66 -65
- package/deps/jq/vendor/oniguruma/src/make_unicode_wb.sh +7 -0
- package/deps/jq/{modules → vendor}/oniguruma/src/make_unicode_wb_data.py +20 -19
- package/deps/jq/{modules → vendor}/oniguruma/src/oniguruma.h +6 -3
- package/deps/jq/{modules → vendor}/oniguruma/src/regcomp.c +14 -6
- package/deps/jq/{modules → vendor}/oniguruma/src/regerror.c +2 -2
- package/deps/jq/{modules → vendor}/oniguruma/src/regexec.c +85 -14
- package/deps/jq/{modules → vendor}/oniguruma/src/regint.h +17 -4
- package/deps/jq/{modules → vendor}/oniguruma/src/regparse.c +115 -27
- package/deps/jq/{modules → vendor}/oniguruma/src/regsyntax.c +10 -7
- package/deps/jq/{modules → vendor}/oniguruma/src/st.c +49 -75
- package/deps/jq/{modules → vendor}/oniguruma/src/st.h +3 -10
- package/deps/jq/{modules → vendor}/oniguruma/src/unicode_egcb_data.c +54 -49
- package/deps/jq/{modules → vendor}/oniguruma/src/unicode_fold1_key.c +1567 -1507
- package/deps/jq/{modules → vendor}/oniguruma/src/unicode_fold2_key.c +1 -1
- package/deps/jq/{modules → vendor}/oniguruma/src/unicode_fold3_key.c +1 -1
- package/deps/jq/vendor/oniguruma/src/unicode_fold_data.c +1619 -0
- package/deps/jq/{modules → vendor}/oniguruma/src/unicode_property_data.c +5520 -4178
- package/deps/jq/{modules → vendor}/oniguruma/src/unicode_property_data_posix.c +239 -83
- package/deps/jq/vendor/oniguruma/src/unicode_unfold_key.c +3497 -0
- package/deps/jq/{modules → vendor}/oniguruma/src/unicode_wb_data.c +51 -19
- package/deps/jq/{modules → vendor}/oniguruma/src/utf16_be.c +3 -2
- package/deps/jq/{modules → vendor}/oniguruma/src/utf16_le.c +3 -2
- package/deps/jq/{modules → vendor}/oniguruma/test/test_back.c +3 -3
- package/deps/jq/{modules → vendor}/oniguruma/test/test_options.c +2 -2
- package/deps/jq/{modules → vendor}/oniguruma/test/test_syntax.c +54 -2
- package/deps/jq/{modules → vendor}/oniguruma/test/test_utf8.c +19 -5
- package/deps/jq/{modules → vendor}/oniguruma/test/testc.c +1 -1
- package/deps/jq/{modules → vendor}/oniguruma/test/testp.c +1 -1
- package/deps/jq/{modules → vendor}/oniguruma/test-driver +13 -6
- package/deps/jq/{modules → vendor}/oniguruma/windows/CMakeLists.txt +1 -1
- package/index.d.ts +2 -1
- package/lib/index.js +1 -0
- package/lib/jq.js +2 -1
- package/package.json +4 -3
- package/test/santiy-async.test.js +4 -4
- package/test/santiy.test.js +4 -4
- package/test/template.test.js +6 -6
- package/deps/jq/modules/oniguruma/src/make_unicode_egcb.sh +0 -7
- package/deps/jq/modules/oniguruma/src/make_unicode_wb.sh +0 -7
- package/deps/jq/modules/oniguruma/src/unicode_fold_data.c +0 -1592
- package/deps/jq/modules/oniguruma/src/unicode_unfold_key.c +0 -3394
- package/deps/jq/scripts/update-website +0 -30
- /package/deps/jq/{src → vendor}/decNumber/ICU-license.html +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decContext.c +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decContext.h +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decDPD.h +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decDouble.c +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decDouble.h +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decNumber.h +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decNumberLocal.h +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decPacked.c +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decPacked.h +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decQuad.c +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decQuad.h +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decSingle.c +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decSingle.h +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decimal128.c +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decimal128.h +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decimal32.c +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decimal32.h +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decimal64.c +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decimal64.h +0 -0
- /package/deps/jq/{src → vendor}/decNumber/decnumber.pdf +0 -0
- /package/deps/jq/{src → vendor}/decNumber/example1.c +0 -0
- /package/deps/jq/{src → vendor}/decNumber/example2.c +0 -0
- /package/deps/jq/{src → vendor}/decNumber/example3.c +0 -0
- /package/deps/jq/{src → vendor}/decNumber/example4.c +0 -0
- /package/deps/jq/{src → vendor}/decNumber/example5.c +0 -0
- /package/deps/jq/{src → vendor}/decNumber/example6.c +0 -0
- /package/deps/jq/{src → vendor}/decNumber/example7.c +0 -0
- /package/deps/jq/{src → vendor}/decNumber/example8.c +0 -0
- /package/deps/jq/{src → vendor}/decNumber/readme.txt +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/.travis.yml +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/AUTHORS +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/COPYING +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/ChangeLog +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/NEWS +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/README +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/README_japanese +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/autogen.sh +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/cmake/Config.cmake.in +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/doc/CALLOUTS.API +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/doc/CALLOUTS.API.ja +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/doc/FAQ +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/doc/FAQ.ja +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/harnesses/ascii_compatible.dict +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/harnesses/deluxe.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/harnesses/dict_conv.py +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/harnesses/fuzzer.options +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/harnesses/libfuzzer-onig.cpp +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/harnesses/regset.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/index.html +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/index_ja.html +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/m4/.whatever +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/make_win.bat +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/make_win32.bat +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/make_win64.bat +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/onig-config.cmake.in +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/onig-config.in +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/oniguruma.pc.cmake.in +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/oniguruma.pc.in +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/sample/CMakeLists.txt +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/sample/Makefile.am +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/sample/bug_fix.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/sample/callout.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/sample/count.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/sample/crnl.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/sample/echo.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/sample/encode.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/sample/listcap.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/sample/names.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/sample/posix.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/sample/regset.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/sample/scan.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/sample/simple.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/sample/sql.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/sample/syntax.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/sample/user_property.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/Makefile.am +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/Makefile.windows +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/big5.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/config.h.cmake.in +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/config.h.win32 +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/config.h.win64 +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/config.h.windows.in +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/cp1251.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/euc_jp.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/euc_jp_prop.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/euc_jp_prop.gperf +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/euc_kr.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/euc_tw.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/gb18030.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_1.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_10.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_11.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_13.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_14.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_15.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_16.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_2.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_3.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_4.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_5.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_6.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_7.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_8.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_9.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/koi8.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/koi8_r.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/make_property.sh +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/mktable.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/onig_init.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/oniggnu.h +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/onigposix.h +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/regenc.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/regenc.h +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/regext.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/reggnu.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/regparse.h +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/regposerr.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/regposix.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/regtrav.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/regversion.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/sjis.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/sjis_prop.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/sjis_prop.gperf +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/unicode.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/utf32_be.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/utf32_le.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/src/utf8.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/test/CMakeLists.txt +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/test/Makefile.am +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/test/test.sh +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/test/test_regset.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/test/testu.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/tis-ci/stub.c +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/tis-ci/test_back.config +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/tis-ci/test_regset.config +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/tis-ci/test_syntax.config +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/tis-ci/test_utf8.config +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/tis-ci/testc.config +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/tis-ci/testu.config +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/tis.config +0 -0
- /package/deps/jq/{modules → vendor}/oniguruma/windows/testc.c +0 -0
package/deps/jq/tests/shtest
CHANGED
|
@@ -14,6 +14,12 @@ JQ="$JQ -b"
|
|
|
14
14
|
|
|
15
15
|
PATH=$JQBASEDIR:$PATH $JQBASEDIR/tests/jq-f-test.sh > /dev/null
|
|
16
16
|
|
|
17
|
+
SHELL=/bin/sh
|
|
18
|
+
export SHELL
|
|
19
|
+
|
|
20
|
+
unset JQ_COLORS
|
|
21
|
+
unset NO_COLOR
|
|
22
|
+
|
|
17
23
|
if [ -f "$JQBASEDIR/.libs/libinject_errors.so" ]; then
|
|
18
24
|
# Do some simple error injection tests to check that we're handling
|
|
19
25
|
# I/O errors correctly.
|
|
@@ -34,77 +40,17 @@ $VALGRIND $Q $JQ -Rse '. == "a\u0000b\nc\u0000d\ne"' $d/input
|
|
|
34
40
|
$VALGRIND $Q $JQ -Rne '[inputs] == ["a\u0000b", "c\u0000d", "e"]' $d/input
|
|
35
41
|
|
|
36
42
|
## Test constant folding
|
|
37
|
-
|
|
38
|
-
## XXX If we add a builtin to list the program's disassembly then we can
|
|
39
|
-
## move all of these into tests/all.test
|
|
40
|
-
|
|
41
|
-
# String constant folding (addition only)
|
|
42
43
|
nref=$($VALGRIND $Q $JQ -n --debug-dump-disasm '"foo"' | wc -l)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if [ $n -ne $nref ]; then
|
|
52
|
-
echo "Constant expression folding for numbers didn't work"
|
|
53
|
-
exit 1
|
|
54
|
-
fi
|
|
55
|
-
n=$($VALGRIND $Q $JQ -n --debug-dump-disasm '1-1' | wc -l)
|
|
56
|
-
if [ $n -ne $nref ]; then
|
|
57
|
-
echo "Constant expression folding for numbers didn't work"
|
|
58
|
-
exit 1
|
|
59
|
-
fi
|
|
60
|
-
n=$($VALGRIND $Q $JQ -n --debug-dump-disasm '2*3' | wc -l)
|
|
61
|
-
if [ $n -ne $nref ]; then
|
|
62
|
-
echo "Constant expression folding for numbers didn't work"
|
|
63
|
-
exit 1
|
|
64
|
-
fi
|
|
65
|
-
n=$($VALGRIND $Q $JQ -n --debug-dump-disasm '9/3' | wc -l)
|
|
66
|
-
if [ $n -ne $nref ]; then
|
|
67
|
-
echo "Constant expression folding for numbers didn't work"
|
|
68
|
-
exit 1
|
|
69
|
-
fi
|
|
70
|
-
n=$($VALGRIND $Q $JQ -n --debug-dump-disasm '9%3' | wc -l)
|
|
71
|
-
if [ $n -ne $nref ]; then
|
|
72
|
-
echo "Constant expression folding for numbers didn't work"
|
|
73
|
-
exit 1
|
|
74
|
-
fi
|
|
75
|
-
n=$($VALGRIND $Q $JQ -n --debug-dump-disasm '9==3' | wc -l)
|
|
76
|
-
if [ $n -ne $nref ]; then
|
|
77
|
-
echo "Constant expression folding for numbers didn't work"
|
|
78
|
-
exit 1
|
|
79
|
-
fi
|
|
80
|
-
n=$($VALGRIND $Q $JQ -n --debug-dump-disasm '9!=3' | wc -l)
|
|
81
|
-
if [ $n -ne $nref ]; then
|
|
82
|
-
echo "Constant expression folding for numbers didn't work"
|
|
83
|
-
exit 1
|
|
84
|
-
fi
|
|
85
|
-
n=$($VALGRIND $Q $JQ -n --debug-dump-disasm '9<3' | wc -l)
|
|
86
|
-
if [ $n -ne $nref ]; then
|
|
87
|
-
echo "Constant expression folding for numbers didn't work"
|
|
88
|
-
exit 1
|
|
89
|
-
fi
|
|
90
|
-
n=$($VALGRIND $Q $JQ -n --debug-dump-disasm '9>3' | wc -l)
|
|
91
|
-
if [ $n -ne $nref ]; then
|
|
92
|
-
echo "Constant expression folding for numbers didn't work"
|
|
93
|
-
exit 1
|
|
94
|
-
fi
|
|
95
|
-
n=$($VALGRIND $Q $JQ -n --debug-dump-disasm '9<=3' | wc -l)
|
|
96
|
-
if [ $n -ne $nref ]; then
|
|
97
|
-
echo "Constant expression folding for numbers didn't work"
|
|
98
|
-
exit 1
|
|
99
|
-
fi
|
|
100
|
-
n=$($VALGRIND $Q $JQ -n --debug-dump-disasm '9>=3' | wc -l)
|
|
101
|
-
if [ $n -ne $nref ]; then
|
|
102
|
-
echo "Constant expression folding for numbers didn't work"
|
|
103
|
-
exit 1
|
|
104
|
-
fi
|
|
44
|
+
for exp in '1+1' '1-1' '2*3' '9/3' '9%3' '9==3' '9!=3' \
|
|
45
|
+
'9<3' '9>3' '9<=3' '9>=3' '1+2*3-4/5%6' '"foo" + "bar"'; do
|
|
46
|
+
n=$($VALGRIND $Q $JQ -n --debug-dump-disasm "$exp" | wc -l)
|
|
47
|
+
if [ $n -ne $nref ]; then
|
|
48
|
+
echo "Constant expression folding didn't work: $exp"
|
|
49
|
+
exit 1
|
|
50
|
+
fi
|
|
51
|
+
done
|
|
105
52
|
|
|
106
53
|
## Test JSON sequence support
|
|
107
|
-
|
|
108
54
|
cat > $d/expected <<EOF
|
|
109
55
|
jq: ignoring parse error: Truncated value at line 2, column 5
|
|
110
56
|
jq: ignoring parse error: Truncated value at line 2, column 25
|
|
@@ -151,6 +97,20 @@ if printf '1\n' | $JQ -cen --seq '[inputs] == []' >/dev/null 2> $d/out; then
|
|
|
151
97
|
fi
|
|
152
98
|
cmp $d/out $d/expected
|
|
153
99
|
|
|
100
|
+
# Test control characters for #2909
|
|
101
|
+
cat > $d/expected <<EOF
|
|
102
|
+
jq: parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 1, column 3
|
|
103
|
+
EOF
|
|
104
|
+
for i in 1 2 30 31; do
|
|
105
|
+
if printf "\"$(printf '\\%03o' $i)\"" | $JQ '.' > $d/out 2>&1; then
|
|
106
|
+
printf 'Error expected but jq exited successfully\n' 1>&2
|
|
107
|
+
exit 2
|
|
108
|
+
fi
|
|
109
|
+
cmp $d/out $d/expected
|
|
110
|
+
done
|
|
111
|
+
printf '" ~\\u007f"\n' > $d/expected
|
|
112
|
+
printf "\"$(printf '\\%03o' 32 126 127)\"" | $JQ '.' > $d/out 2>&1
|
|
113
|
+
cmp $d/out $d/expected
|
|
154
114
|
|
|
155
115
|
## Test --exit-status
|
|
156
116
|
data='{"i": 1}\n{"i": 2}\n{"i": 3}\n'
|
|
@@ -195,12 +155,19 @@ cmp $d/out $d/expected
|
|
|
195
155
|
printf "[1,2][3,4]\n" | $JQ -cs add > $d/out 2>&1
|
|
196
156
|
cmp $d/out $d/expected
|
|
197
157
|
|
|
158
|
+
# Regression test for #3273
|
|
159
|
+
echo "[[[0],1],[[0]],[[0],2],[[0]]]" > $d/expected
|
|
160
|
+
printf "[1][2]" | $JQ -c -s --stream . > $d/out 2>&1
|
|
161
|
+
cmp $d/out $d/expected
|
|
162
|
+
printf "[1][2]\n" | $JQ -c -s --stream . > $d/out 2>&1
|
|
163
|
+
cmp $d/out $d/expected
|
|
164
|
+
|
|
198
165
|
# Regression test for --raw-output0
|
|
199
166
|
printf "a\0b\0" > $d/expected
|
|
200
|
-
printf '["a", "b"]' | $VALGRIND $Q $JQ --raw-output0 .[] > $d/out
|
|
167
|
+
printf '["a", "b"]' | $VALGRIND $Q $JQ --raw-output0 '.[]' > $d/out
|
|
201
168
|
cmp $d/out $d/expected
|
|
202
169
|
printf "a\0" > $d/expected
|
|
203
|
-
if printf '["a", "c\\u0000d", "b"]' | $VALGRIND $Q $JQ --raw-output0 .[] > $d/out; then
|
|
170
|
+
if printf '["a", "c\\u0000d", "b"]' | $VALGRIND $Q $JQ --raw-output0 '.[]' > $d/out; then
|
|
204
171
|
echo "Should exit error on string containing NUL with --raw-output0" 1>&2
|
|
205
172
|
exit 1
|
|
206
173
|
elif [ $? -ne 5 ]; then
|
|
@@ -210,6 +177,34 @@ else
|
|
|
210
177
|
cmp $d/out $d/expected
|
|
211
178
|
fi
|
|
212
179
|
|
|
180
|
+
# Regression tests for #3194
|
|
181
|
+
echo 42 > $d/expected
|
|
182
|
+
$JQ -nn 42 > $d/out 2>&1
|
|
183
|
+
cmp $d/out $d/expected
|
|
184
|
+
|
|
185
|
+
$JQ -nL. 42 > $d/out 2>&1
|
|
186
|
+
cmp $d/out $d/expected
|
|
187
|
+
$JQ -nL . 42 > $d/out 2>&1
|
|
188
|
+
cmp $d/out $d/expected
|
|
189
|
+
|
|
190
|
+
$JQ -h > $d/expected 2>&1
|
|
191
|
+
$JQ -hV > $d/out 2>&1
|
|
192
|
+
cmp $d/out $d/expected
|
|
193
|
+
$JQ -h -V > $d/out 2>&1
|
|
194
|
+
cmp $d/out $d/expected
|
|
195
|
+
|
|
196
|
+
$JQ -V > $d/expected 2>&1
|
|
197
|
+
$JQ -Vh > $d/out 2>&1
|
|
198
|
+
cmp $d/out $d/expected
|
|
199
|
+
$JQ -V -h > $d/out 2>&1
|
|
200
|
+
cmp $d/out $d/expected
|
|
201
|
+
|
|
202
|
+
# CRLF line break support #1219
|
|
203
|
+
if ! x=$($JQ -n "$(printf '1\r\n+\r\n2')") || [ "$x" != '3' ]; then
|
|
204
|
+
echo 'CRLF line break support failed?' 1>&2
|
|
205
|
+
exit 1
|
|
206
|
+
fi
|
|
207
|
+
|
|
213
208
|
## Test streaming parser
|
|
214
209
|
|
|
215
210
|
## If we add an option to stream to the `import ... as $symbol;` directive
|
|
@@ -359,6 +354,17 @@ if [ "$(HOME="$mods/home1" $VALGRIND $Q $JQ -nr fg)" != foobar ]; then
|
|
|
359
354
|
exit 1
|
|
360
355
|
fi
|
|
361
356
|
|
|
357
|
+
if $msys || $mingw; then
|
|
358
|
+
HOME_BAK=$HOME
|
|
359
|
+
unset HOME
|
|
360
|
+
if [ "$(USERPROFILE="$mods/home1" $VALGRIND $Q $JQ -nr foo)" != baz ]; then
|
|
361
|
+
echo "Bug #3104 regressed (sourcing %USERPROFILE%/.jq on Windows)" 1>&2
|
|
362
|
+
exit 1
|
|
363
|
+
fi
|
|
364
|
+
export HOME=$HOME_BAK
|
|
365
|
+
unset HOME_BAK
|
|
366
|
+
fi
|
|
367
|
+
|
|
362
368
|
if [ $(HOME="$mods/home1" $VALGRIND $Q $JQ --debug-dump-disasm -n fg | grep '^[a-z]' | wc -l) -ne 3 ]; then
|
|
363
369
|
echo "Binding too many defs into program" 1>&2
|
|
364
370
|
exit 1
|
|
@@ -423,7 +429,6 @@ if [ "$($VALGRIND $Q $JQ -n '{"a":"xyz"} | halt_error(1)' 2>&1)" != '{"a":"xyz"}
|
|
|
423
429
|
fi
|
|
424
430
|
|
|
425
431
|
# Check $JQ_COLORS
|
|
426
|
-
unset JQ_COLORS
|
|
427
432
|
|
|
428
433
|
## Default colors, null input
|
|
429
434
|
$JQ -Ccn . > $d/color
|
|
@@ -435,79 +440,180 @@ JQ_COLORS='4;31' $JQ -Ccn . > $d/color
|
|
|
435
440
|
printf '\033[4;31mnull\033[0m\n' > $d/expect
|
|
436
441
|
cmp $d/color $d/expect
|
|
437
442
|
|
|
443
|
+
## Set implicit empty color, null input
|
|
444
|
+
$JQ -Ccn . > $d/color
|
|
445
|
+
printf '\033[0;90mnull\033[0m\n' > $d/expect
|
|
446
|
+
cmp $d/color $d/expect
|
|
447
|
+
|
|
448
|
+
## Set explicit empty color, null input
|
|
449
|
+
JQ_COLORS=':' $JQ -Ccn . > $d/color
|
|
450
|
+
printf '\033[mnull\033[0m\n' > $d/expect
|
|
451
|
+
cmp $d/color $d/expect
|
|
452
|
+
|
|
453
|
+
## Extra colors, null input
|
|
454
|
+
JQ_COLORS='::::::::' $JQ -Ccn . > $d/color
|
|
455
|
+
printf '\033[mnull\033[0m\n' > $d/expect
|
|
456
|
+
cmp $d/color $d/expect
|
|
457
|
+
|
|
438
458
|
## Default colors, complex input
|
|
439
|
-
$JQ -Ccn '[{"a":true,"b":false},123,null]' > $d/color
|
|
459
|
+
$JQ -Ccn '[{"a":true,"b":false},"abc",123,null]' > $d/color
|
|
440
460
|
{
|
|
441
|
-
printf '\033[1;39m[\033[
|
|
442
|
-
printf '\033[
|
|
443
|
-
printf '
|
|
444
|
-
printf '
|
|
445
|
-
printf '
|
|
446
|
-
printf '
|
|
447
|
-
printf '
|
|
448
|
-
printf '
|
|
449
|
-
printf '
|
|
450
|
-
printf '
|
|
451
|
-
printf '39m,\033[
|
|
452
|
-
printf '
|
|
453
|
-
printf '
|
|
461
|
+
printf '\033[1;39m[\033[0m'
|
|
462
|
+
printf '\033[1;39m{\033[0m'
|
|
463
|
+
printf '\033[1;34m"a"\033[0m'
|
|
464
|
+
printf '\033[1;39m:\033[0m'
|
|
465
|
+
printf '\033[0;39mtrue\033[0m'
|
|
466
|
+
printf '\033[1;39m,\033[0m'
|
|
467
|
+
printf '\033[1;34m"b"\033[0m'
|
|
468
|
+
printf '\033[1;39m:\033[0m'
|
|
469
|
+
printf '\033[0;39mfalse\033[0m'
|
|
470
|
+
printf '\033[1;39m}\033[0m'
|
|
471
|
+
printf '\033[1;39m,\033[0m'
|
|
472
|
+
printf '\033[0;32m"abc"\033[0m'
|
|
473
|
+
printf '\033[1;39m,\033[0m'
|
|
474
|
+
printf '\033[0;39m123\033[0m'
|
|
475
|
+
printf '\033[1;39m,\033[0m'
|
|
476
|
+
printf '\033[0;90mnull\033[0m'
|
|
477
|
+
printf '\033[1;39m]\033[0m\n'
|
|
454
478
|
} > $d/expect
|
|
455
479
|
cmp $d/color $d/expect
|
|
456
480
|
|
|
457
481
|
## Set non-default colors, complex input
|
|
458
482
|
JQ_COLORS='0;30:0;31:0;32:0;33:0;34:1;35:1;36:1;37' \
|
|
459
|
-
$JQ -Ccn '[{"a":true,"b":false},123,null]' > $d/color
|
|
483
|
+
$JQ -Ccn '[{"a":true,"b":false},"abc",123,null]' > $d/color
|
|
460
484
|
{
|
|
461
|
-
printf '\033[1;35m[\033[
|
|
462
|
-
printf '\033[
|
|
463
|
-
printf '
|
|
464
|
-
printf '
|
|
465
|
-
printf '
|
|
466
|
-
printf '
|
|
467
|
-
printf '
|
|
468
|
-
printf '
|
|
469
|
-
printf '
|
|
470
|
-
printf '
|
|
471
|
-
printf '35m,\033[
|
|
472
|
-
printf '
|
|
473
|
-
printf '
|
|
485
|
+
printf '\033[1;35m[\033[0m'
|
|
486
|
+
printf '\033[1;36m{\033[0m'
|
|
487
|
+
printf '\033[1;37m"a"\033[0m'
|
|
488
|
+
printf '\033[1;36m:\033[0m'
|
|
489
|
+
printf '\033[0;32mtrue\033[0m'
|
|
490
|
+
printf '\033[1;36m,\033[0m'
|
|
491
|
+
printf '\033[1;37m"b"\033[0m'
|
|
492
|
+
printf '\033[1;36m:\033[0m'
|
|
493
|
+
printf '\033[0;31mfalse\033[0m'
|
|
494
|
+
printf '\033[1;36m}\033[0m'
|
|
495
|
+
printf '\033[1;35m,\033[0m'
|
|
496
|
+
printf '\033[0;34m"abc"\033[0m'
|
|
497
|
+
printf '\033[1;35m,\033[0m'
|
|
498
|
+
printf '\033[0;33m123\033[0m'
|
|
499
|
+
printf '\033[1;35m,\033[0m'
|
|
500
|
+
printf '\033[0;30mnull\033[0m'
|
|
501
|
+
printf '\033[1;35m]\033[0m\n'
|
|
474
502
|
} > $d/expect
|
|
475
503
|
cmp $d/color $d/expect
|
|
476
504
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
505
|
+
## Set non-default colors only for literals, complex input
|
|
506
|
+
JQ_COLORS='0;37:0;31:0;35:0;34:0;36' \
|
|
507
|
+
$JQ -Ccn '[{"a":true,"b":false},"abc",123,null]' > $d/color
|
|
508
|
+
{
|
|
509
|
+
printf '\033[1;39m[\033[0m'
|
|
510
|
+
printf '\033[1;39m{\033[0m'
|
|
511
|
+
printf '\033[1;34m"a"\033[0m'
|
|
512
|
+
printf '\033[1;39m:\033[0m'
|
|
513
|
+
printf '\033[0;35mtrue\033[0m'
|
|
514
|
+
printf '\033[1;39m,\033[0m'
|
|
515
|
+
printf '\033[1;34m"b"\033[0m'
|
|
516
|
+
printf '\033[1;39m:\033[0m'
|
|
517
|
+
printf '\033[0;31mfalse\033[0m'
|
|
518
|
+
printf '\033[1;39m}\033[0m'
|
|
519
|
+
printf '\033[1;39m,\033[0m'
|
|
520
|
+
printf '\033[0;36m"abc"\033[0m'
|
|
521
|
+
printf '\033[1;39m,\033[0m'
|
|
522
|
+
printf '\033[0;34m123\033[0m'
|
|
523
|
+
printf '\033[1;39m,\033[0m'
|
|
524
|
+
printf '\033[0;37mnull\033[0m'
|
|
525
|
+
printf '\033[1;39m]\033[0m\n'
|
|
526
|
+
} > $d/expect
|
|
490
527
|
cmp $d/color $d/expect
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
528
|
+
|
|
529
|
+
## Default colors, complex input, indented
|
|
530
|
+
$JQ -Cn '[{"a":true,"b":false},"abc",123,null]' > $d/color
|
|
531
|
+
{
|
|
532
|
+
printf '\033[1;39m[\033[0m\n'
|
|
533
|
+
printf ' \033[1;39m{\033[0m\n'
|
|
534
|
+
printf ' \033[1;34m"a"\033[0m'
|
|
535
|
+
printf '\033[1;39m:\033[0m '
|
|
536
|
+
printf '\033[0;39mtrue\033[0m'
|
|
537
|
+
printf '\033[1;39m,\033[0m\n'
|
|
538
|
+
printf ' \033[1;34m"b"\033[0m'
|
|
539
|
+
printf '\033[1;39m:\033[0m '
|
|
540
|
+
printf '\033[0;39mfalse\033[0m\n'
|
|
541
|
+
printf ' \033[1;39m}\033[0m'
|
|
542
|
+
printf '\033[1;39m,\033[0m\n'
|
|
543
|
+
printf ' \033[0;32m"abc"\033[0m'
|
|
544
|
+
printf '\033[1;39m,\033[0m\n'
|
|
545
|
+
printf ' \033[0;39m123\033[0m'
|
|
546
|
+
printf '\033[1;39m,\033[0m\n'
|
|
547
|
+
printf ' \033[0;90mnull\033[0m\n'
|
|
548
|
+
printf '\033[1;39m]\033[0m\n'
|
|
549
|
+
} > $d/expect
|
|
494
550
|
cmp $d/color $d/expect
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
551
|
+
|
|
552
|
+
## Set non-default colors, complex input, indented
|
|
553
|
+
JQ_COLORS='0;30:0;31:0;32:0;33:0;34:1;35:1;36:1;37' \
|
|
554
|
+
$JQ -Cn '[{"a":true,"b":false},"abc",123,null]' > $d/color
|
|
555
|
+
{
|
|
556
|
+
printf '\033[1;35m[\033[0m\n'
|
|
557
|
+
printf ' \033[1;36m{\033[0m\n'
|
|
558
|
+
printf ' \033[1;37m"a"\033[0m'
|
|
559
|
+
printf '\033[1;36m:\033[0m '
|
|
560
|
+
printf '\033[0;32mtrue\033[0m'
|
|
561
|
+
printf '\033[1;36m,\033[0m\n'
|
|
562
|
+
printf ' \033[1;37m"b"\033[0m'
|
|
563
|
+
printf '\033[1;36m:\033[0m '
|
|
564
|
+
printf '\033[0;31mfalse\033[0m\n'
|
|
565
|
+
printf ' \033[1;36m}\033[0m'
|
|
566
|
+
printf '\033[1;35m,\033[0m\n'
|
|
567
|
+
printf ' \033[0;34m"abc"\033[0m'
|
|
568
|
+
printf '\033[1;35m,\033[0m\n'
|
|
569
|
+
printf ' \033[0;33m123\033[0m'
|
|
570
|
+
printf '\033[1;35m,\033[0m\n'
|
|
571
|
+
printf ' \033[0;30mnull\033[0m\n'
|
|
572
|
+
printf '\033[1;35m]\033[0m\n'
|
|
573
|
+
} > $d/expect
|
|
498
574
|
cmp $d/color $d/expect
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
575
|
+
|
|
576
|
+
## Set truecolor, complex input, indented
|
|
577
|
+
JQ_COLORS=$(printf '38;2;%s:' \
|
|
578
|
+
'255;173;173' '255;214;165' '253;255;182' '202;255;191' \
|
|
579
|
+
'155;246;255' '160;196;255' '189;178;255' '255;198;255') \
|
|
580
|
+
$JQ -Cn '[{"a":true,"b":false},"abc",123,null]' > $d/color
|
|
581
|
+
{
|
|
582
|
+
printf '\033[38;2;160;196;255m[\033[0m\n'
|
|
583
|
+
printf ' \033[38;2;189;178;255m{\033[0m\n'
|
|
584
|
+
printf ' \033[38;2;255;198;255m"a"\033[0m'
|
|
585
|
+
printf '\033[38;2;189;178;255m:\033[0m '
|
|
586
|
+
printf '\033[38;2;253;255;182mtrue\033[0m'
|
|
587
|
+
printf '\033[38;2;189;178;255m,\033[0m\n'
|
|
588
|
+
printf ' \033[38;2;255;198;255m"b"\033[0m'
|
|
589
|
+
printf '\033[38;2;189;178;255m:\033[0m '
|
|
590
|
+
printf '\033[38;2;255;214;165mfalse\033[0m\n'
|
|
591
|
+
printf ' \033[38;2;189;178;255m}\033[0m'
|
|
592
|
+
printf '\033[38;2;160;196;255m,\033[0m\n'
|
|
593
|
+
printf ' \033[38;2;155;246;255m"abc"\033[0m'
|
|
594
|
+
printf '\033[38;2;160;196;255m,\033[0m\n'
|
|
595
|
+
printf ' \033[38;2;202;255;191m123\033[0m'
|
|
596
|
+
printf '\033[38;2;160;196;255m,\033[0m\n'
|
|
597
|
+
printf ' \033[38;2;255;173;173mnull\033[0m\n'
|
|
598
|
+
printf '\033[38;2;160;196;255m]\033[0m\n'
|
|
599
|
+
} > $d/expect
|
|
502
600
|
cmp $d/color $d/expect
|
|
503
|
-
|
|
601
|
+
|
|
602
|
+
# Check invalid JQ_COLORS
|
|
603
|
+
echo 'Failed to set $JQ_COLORS' > $d/expect_warning
|
|
604
|
+
$JQ -Ccn '[{"a":true,"b":false},"abc",123,null]' > $d/expect
|
|
605
|
+
for colors in '/' '[30' '30m' '30:31m:32' '30:*:31' 'invalid'; do
|
|
606
|
+
JQ_COLORS=$colors \
|
|
607
|
+
$JQ -Ccn '[{"a":true,"b":false},"abc",123,null]' > $d/color 2>$d/warning
|
|
608
|
+
cmp $d/color $d/expect
|
|
609
|
+
cmp $d/warning $d/expect_warning
|
|
610
|
+
done
|
|
504
611
|
|
|
505
612
|
# Check $NO_COLOR
|
|
506
613
|
test_no_color=true
|
|
507
614
|
$msys && test_no_color=false
|
|
508
615
|
$mingw && test_no_color=false
|
|
509
616
|
if $test_no_color && command -v script >/dev/null 2>&1; then
|
|
510
|
-
unset NO_COLOR
|
|
511
617
|
if script -qc echo /dev/null >/dev/null 2>&1; then
|
|
512
618
|
faketty() { script -qec "$*" /dev/null; }
|
|
513
619
|
else # macOS
|
|
@@ -520,17 +626,17 @@ if $test_no_color && command -v script >/dev/null 2>&1; then
|
|
|
520
626
|
od -tc $d/expect
|
|
521
627
|
od -tc $d/color
|
|
522
628
|
cmp $d/color $d/expect
|
|
523
|
-
NO_COLOR=
|
|
629
|
+
faketty env NO_COLOR= $JQ_NO_B -n . > $d/color
|
|
524
630
|
printf '\033[0;90mnull\033[0m\r\n' > $d/expect
|
|
525
631
|
od -tc $d/expect
|
|
526
632
|
od -tc $d/color
|
|
527
633
|
cmp $d/color $d/expect
|
|
528
|
-
NO_COLOR=1
|
|
634
|
+
faketty env NO_COLOR=1 $JQ_NO_B -n . > $d/color
|
|
529
635
|
printf 'null\r\n' > $d/expect
|
|
530
636
|
od -tc $d/expect
|
|
531
637
|
od -tc $d/color
|
|
532
638
|
cmp $d/color $d/expect
|
|
533
|
-
NO_COLOR=1
|
|
639
|
+
faketty env NO_COLOR=1 $JQ_NO_B -Cn . > $d/color
|
|
534
640
|
printf '\033[0;90mnull\033[0m\r\n' > $d/expect
|
|
535
641
|
od -tc $d/expect
|
|
536
642
|
od -tc $d/color
|
|
@@ -582,6 +688,43 @@ EOF
|
|
|
582
688
|
fi
|
|
583
689
|
fi
|
|
584
690
|
|
|
691
|
+
# Test syntax error messages of multiline filter (we can't test in jq.test)
|
|
692
|
+
if $VALGRIND $Q $JQ -n '[
|
|
693
|
+
try if .
|
|
694
|
+
then 1
|
|
695
|
+
else 2
|
|
696
|
+
catch ]' > $d/out 2>&1; then
|
|
697
|
+
echo 'syntax error not detected'
|
|
698
|
+
exit 1
|
|
699
|
+
fi
|
|
700
|
+
cat > $d/expected <<EOF
|
|
701
|
+
jq: error: syntax error, unexpected catch, expecting end or '|' or ',' at <top-level>, line 5, column 3:
|
|
702
|
+
catch ]
|
|
703
|
+
^^^^^
|
|
704
|
+
jq: error: Possibly unterminated 'if' statement at <top-level>, line 2, column 7:
|
|
705
|
+
try if .
|
|
706
|
+
^^^^
|
|
707
|
+
jq: error: Possibly unterminated 'try' statement at <top-level>, line 2, column 3:
|
|
708
|
+
try if .
|
|
709
|
+
^^^^^^^^
|
|
710
|
+
jq: 3 compile errors
|
|
711
|
+
EOF
|
|
712
|
+
diff $d/out $d/expected
|
|
713
|
+
|
|
714
|
+
# Test syntax error messages when error happens at the end.
|
|
715
|
+
if $VALGRIND $Q $JQ -n 'if
|
|
716
|
+
' > $d/out 2>&1; then
|
|
717
|
+
echo 'syntax error not detected'
|
|
718
|
+
exit 1
|
|
719
|
+
fi
|
|
720
|
+
cat > $d/expected <<EOF
|
|
721
|
+
jq: error: syntax error, unexpected end of file at <top-level>, line 1, column 3:
|
|
722
|
+
if
|
|
723
|
+
^
|
|
724
|
+
jq: 1 compile error
|
|
725
|
+
EOF
|
|
726
|
+
diff $d/out $d/expected
|
|
727
|
+
|
|
585
728
|
# Comments!
|
|
586
729
|
if ! x=$($JQ -n '123 # comment') || [ "$x" != 123 ]; then
|
|
587
730
|
echo 'comment did not work'
|
|
@@ -594,10 +737,29 @@ if ! x=$($JQ -n "1 # foo$cr + 2") || [ "$x" != 1 ]; then
|
|
|
594
737
|
exit 1
|
|
595
738
|
fi
|
|
596
739
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
740
|
+
if ! x=$($JQ -cn '[
|
|
741
|
+
1,
|
|
742
|
+
# foo \
|
|
743
|
+
2,
|
|
744
|
+
# bar \\
|
|
745
|
+
3,
|
|
746
|
+
4, # baz \\\
|
|
747
|
+
5, \
|
|
748
|
+
6,
|
|
749
|
+
7
|
|
750
|
+
# comment \
|
|
751
|
+
comment \
|
|
752
|
+
comment
|
|
753
|
+
]') || [ "$x" != '[1,3,4,7]' ]; then
|
|
754
|
+
echo 'multiline comment was not handled correctly'
|
|
755
|
+
exit 1
|
|
756
|
+
fi
|
|
757
|
+
|
|
758
|
+
if ! x=$($JQ -cn "$(printf '[\r\n1,# comment\r\n2,# comment\\\r\ncomment\r\n3\r\n]')") \
|
|
759
|
+
|| [ "$x" != '[1,2,3]' ]; then
|
|
760
|
+
echo 'multiline comment with CRLF line breaks was not handled correctly'
|
|
761
|
+
exit 1
|
|
762
|
+
fi
|
|
601
763
|
|
|
602
764
|
# Allow passing the inline jq script before -- #2919
|
|
603
765
|
if ! r=$($JQ --args -rn -- '$ARGS.positional[0]' bar) || [ "$r" != bar ]; then
|
|
@@ -614,4 +776,70 @@ $VALGRIND $Q $JQ . <<\NUM
|
|
|
614
776
|
-10E-1000000001
|
|
615
777
|
NUM
|
|
616
778
|
|
|
779
|
+
# test for --indent and --compact-output -- #1465
|
|
780
|
+
printf '[1,2]\n' > $d/expected
|
|
781
|
+
$JQ --compact-output -n "[1,2]" > $d/out
|
|
782
|
+
cmp $d/out $d/expected
|
|
783
|
+
|
|
784
|
+
printf '[\n1,\n2\n]\n' > $d/expected
|
|
785
|
+
$JQ --indent 0 -n "[1,2]" > $d/out
|
|
786
|
+
cmp $d/out $d/expected
|
|
787
|
+
|
|
788
|
+
printf '[\n 1,\n 2\n]\n' > $d/expected
|
|
789
|
+
$JQ --indent 1 -n "[1,2]" > $d/out
|
|
790
|
+
cmp $d/out $d/expected
|
|
791
|
+
|
|
792
|
+
printf '[\n 1,\n 2\n]\n' > $d/expected
|
|
793
|
+
$JQ --indent 5 -n "[1,2]" > $d/out
|
|
794
|
+
cmp $d/out $d/expected
|
|
795
|
+
|
|
796
|
+
printf '[\n{\n"a": 1\n}\n]\n' > $d/expected
|
|
797
|
+
$JQ --indent 0 -n "[{a:1}]" > $d/out
|
|
798
|
+
cmp $d/out $d/expected
|
|
799
|
+
|
|
800
|
+
printf '[\n {\n "a": 1\n }\n]\n' > $d/expected
|
|
801
|
+
$JQ --indent 1 -n "[{a:1}]" > $d/out
|
|
802
|
+
cmp $d/out $d/expected
|
|
803
|
+
|
|
804
|
+
printf '[\n {\n "a": 1\n }\n]\n' > $d/expected
|
|
805
|
+
$JQ --indent 6 -n "[{a:1}]" > $d/out
|
|
806
|
+
cmp $d/out $d/expected
|
|
807
|
+
|
|
808
|
+
if ! $msys && ! $mingw; then
|
|
809
|
+
# Test handling of timezones -- #2429, #2475
|
|
810
|
+
if ! r=$(TZ=Asia/Tokyo $JQ -rn '1731627341 | strflocaltime("%F %T %z %Z")') \
|
|
811
|
+
|| [ "$r" != "2024-11-15 08:35:41 +0900 JST" ]; then
|
|
812
|
+
echo "Incorrectly formatted local time"
|
|
813
|
+
exit 1
|
|
814
|
+
fi
|
|
815
|
+
|
|
816
|
+
if ! r=$(TZ=Europe/Paris $JQ -rn '1731627341 | strflocaltime("%F %T %z %Z")') \
|
|
817
|
+
|| [ "$r" != "2024-11-15 00:35:41 +0100 CET" ]; then
|
|
818
|
+
echo "Incorrectly formatted local time"
|
|
819
|
+
exit 1
|
|
820
|
+
fi
|
|
821
|
+
|
|
822
|
+
# Test when DST is in effect: #1912
|
|
823
|
+
if ! r=$(TZ=Europe/Paris $JQ -rn '1750500000 | strflocaltime("%F %T %z %Z")') \
|
|
824
|
+
|| [ "$r" != "2025-06-21 12:00:00 +0200 CEST" ]; then
|
|
825
|
+
echo "Incorrectly formatted local time"
|
|
826
|
+
exit 1
|
|
827
|
+
fi
|
|
828
|
+
|
|
829
|
+
if ! r=$(TZ=Europe/Paris $JQ -rn '1731627341 | strftime("%F %T %z %Z")') \
|
|
830
|
+
|| ( [ "$r" != "2024-11-14 23:35:41 +0000 UTC" ] \
|
|
831
|
+
&& [ "$r" != "2024-11-14 23:35:41 +0000 GMT" ] ); then
|
|
832
|
+
echo "Incorrectly formatted universal time"
|
|
833
|
+
exit 1
|
|
834
|
+
fi
|
|
835
|
+
|
|
836
|
+
if ! r=$(TZ=Etc/GMT+7 $JQ -nc '1731627341 | .,. | [strftime("%FT%T"),strflocaltime("%FT%T%z")]'
|
|
837
|
+
) \
|
|
838
|
+
|| [ "$r" != '["2024-11-14T23:35:41","2024-11-14T16:35:41-0700"]
|
|
839
|
+
["2024-11-14T23:35:41","2024-11-14T16:35:41-0700"]' ]; then
|
|
840
|
+
echo "strftime or strftimelocal are not pure functions"
|
|
841
|
+
exit 1
|
|
842
|
+
fi
|
|
843
|
+
fi
|
|
844
|
+
|
|
617
845
|
exit 0
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Tests are groups of three lines: program, input, expected output
|
|
2
|
+
# Blank lines and lines starting with # are ignored
|
|
3
|
+
|
|
4
|
+
@uri
|
|
5
|
+
"<>&'\"\t"
|
|
6
|
+
"%3C%3E%26%27%22%09"
|
|
7
|
+
|
|
8
|
+
# decoding encoded output results in same text
|
|
9
|
+
(@uri|@urid)
|
|
10
|
+
"<>&'\"\t"
|
|
11
|
+
"<>&'\"\t"
|
|
12
|
+
|
|
13
|
+
# testing variable length unicode characters
|
|
14
|
+
@uri
|
|
15
|
+
"a \u03bc \u2230 \ud83d\ude0e"
|
|
16
|
+
"a%20%CE%BC%20%E2%88%B0%20%F0%9F%98%8E"
|
|
17
|
+
|
|
18
|
+
@urid
|
|
19
|
+
"a%20%CE%BC%20%E2%88%B0%20%F0%9F%98%8E"
|
|
20
|
+
"a \u03bc \u2230 \ud83d\ude0e"
|
|
21
|
+
|
|
22
|
+
### invalid uri strings
|
|
23
|
+
|
|
24
|
+
# unicode character should be length 4 (not 3)
|
|
25
|
+
. | try @urid catch .
|
|
26
|
+
"%F0%93%81"
|
|
27
|
+
"string (\"%F0%93%81\") is not a valid uri encoding"
|
|
28
|
+
|
|
29
|
+
# invalid hex value ('FX')
|
|
30
|
+
. | try @urid catch .
|
|
31
|
+
"%FX%9F%98%8E"
|
|
32
|
+
"string (\"%FX%9F%98%8E\") is not a valid uri encoding"
|
|
33
|
+
|
|
34
|
+
# trailing utf-8 octets must be formatted like 10xxxxxx
|
|
35
|
+
# 'C0' = 11000000 invalid
|
|
36
|
+
. | try @urid catch .
|
|
37
|
+
"%F0%C0%81%8E"
|
|
38
|
+
"string (\"%F0%C0%81%8E\") is not a valid uri encoding"
|
|
@@ -756,7 +756,7 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc,
|
|
|
756
756
|
#endif
|
|
757
757
|
|
|
758
758
|
/* Effect the multiplication */
|
|
759
|
-
// The
|
|
759
|
+
// The multiplication proceeds using MFC's lazy-carry resolution
|
|
760
760
|
// algorithm from decNumber. First, the multiplication is
|
|
761
761
|
// effected, allowing accumulation of the partial products (which
|
|
762
762
|
// are in base-billion at each column position) into 64 bits
|
|
@@ -376,7 +376,7 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num,
|
|
|
376
376
|
UBFROMUI(ub-3, 0); // to 00000000
|
|
377
377
|
}
|
|
378
378
|
// [note ub could now be to left of msd, and it is not safe
|
|
379
|
-
// to write to the
|
|
379
|
+
// to write to the left of the msd]
|
|
380
380
|
// now at most 3 digits left to non-9 (usually just the one)
|
|
381
381
|
for (; ub>=umsd; *ub=0, ub--) {
|
|
382
382
|
if (*ub==9) continue; // carry
|