]> git.ipfire.org Git - thirdparty/git.git/commit - t/t5562-http-backend-content-length.sh
tests: fix broken &&-chains in `{...}` groups
authorEric Sunshine <sunshine@sunshineco.com>
Thu, 9 Dec 2021 05:11:08 +0000 (00:11 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Dec 2021 18:29:48 +0000 (10:29 -0800)
commit7abcbcb7ea4303adffd169d5367ce70904e79bf5
treec200af8c8a1fe797b4d45bb9d0d025b336863046
parentc576868eaff8cc4c7fb5cf8b787756b16fde268b
tests: fix broken &&-chains in `{...}` groups

The top-level &&-chain checker built into t/test-lib.sh causes tests to
magically exit with code 117 if the &&-chain is broken. However, it has
the shortcoming that the magic does not work within `{...}` groups,
`(...)` subshells, `$(...)` substitutions, or within bodies of compound
statements, such as `if`, `for`, `while`, `case`, etc. `chainlint.sed`
partly fills in the gap by catching broken &&-chains in `(...)`
subshells, but bugs can still lurk behind broken &&-chains in the other
cases.

Fix broken &&-chains in `{...}` groups in order to reduce the number of
possible lurking bugs.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
19 files changed:
t/t0021-conversion.sh
t/t0069-oidtree.sh
t/t1006-cat-file.sh
t/t1300-config.sh
t/t1403-show-ref.sh
t/t2200-add-update.sh
t/t2201-add-update-typechange.sh
t/t4023-diff-rename-typechange.sh
t/t4124-apply-ws-rule.sh
t/t4150-am.sh
t/t4212-log-corrupt.sh
t/t5316-pack-delta-depth.sh
t/t5510-fetch.sh
t/t5515-fetch-merge-logic.sh
t/t5562-http-backend-content-length.sh
t/t5570-git-daemon.sh
t/t5571-pre-push-hook.sh
t/t7513-interpret-trailers.sh
t/t8002-blame.sh