Improve error message truncation with closing delimiters (#3478)

Truncated strings now show closing delimiters: `..."` for strings,
`...]` for arrays, and `...}` for objects, making error messages
clearer.
This commit is contained in:
itchyny authored and GitHub committed 2026-02-25 08:14:23 +09:00
1 parent a2741ee0a8
commit 22361cfb87
9 files changed
+88 -72

No files matched your search

+10 -1
View File
@@ -25,9 +25,18 @@ jobs:
--disable-maintainer-mode \
--disable-decnum
make -j"$(nproc)"
make check
file ./jq
- name: Test
run: |
diff <(echo 100000000000000000000 | ./jq) <(echo 1e+20)
make check VERBOSE=yes
git diff --exit-code
- name: Upload Test Logs
if: ${{ failure() }}
uses: actions/upload-artifact@v6
with:
name: test-logs-decnum-disabled
retention-days: 7
path: |
test-suite.log
tests/*.log