]> git.ipfire.org Git - thirdparty/git.git/commit
t/chainlint/*.test: fix invalid test cases due to mixing quote types
authorEric Sunshine <sunshine@sunshineco.com>
Mon, 13 Dec 2021 06:30:46 +0000 (01:30 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Dec 2021 22:15:28 +0000 (14:15 -0800)
commit5459bc1bbb54536df18b034afd390f899bda37be
tree21cb3b85054bcca224617cae862c50ceff4765ce
parent925d7304d2a5f5dda9fbe3f541338bb87083f6b2
t/chainlint/*.test: fix invalid test cases due to mixing quote types

The chainlint self-test code snippets are supposed to represent the body
of a test_expect_success() or test_expect_failure(), yet the contents of
a few tests would have caused the shell to report syntax errors had they
been real test bodies due to the mix of single- and double-quotes.
Although chainlint.sed, with its simplistic heuristics, is blind to this
problem, a future more robust chainlint implementation might not have
such a limitation. Therefore, stop mixing quote types haphazardly in
those tests and unify quoting throughout. While at it, drop chunks of
tests which merely repeat what is already tested elsewhere but with
alternative quotes.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
20 files changed:
t/chainlint/broken-chain.test
t/chainlint/case.test
t/chainlint/complex-if-in-cuddled-loop.test
t/chainlint/cuddled-if-then-else.test
t/chainlint/cuddled-loop.test
t/chainlint/for-loop.test
t/chainlint/here-doc.expect
t/chainlint/here-doc.test
t/chainlint/if-in-loop.test
t/chainlint/if-then-else.test
t/chainlint/loop-in-if.test
t/chainlint/multi-line-string.expect
t/chainlint/multi-line-string.test
t/chainlint/nested-subshell-comment.test
t/chainlint/pipe.test
t/chainlint/subshell-here-doc.expect
t/chainlint/subshell-here-doc.test
t/chainlint/t7900-subtree.expect
t/chainlint/t7900-subtree.test
t/chainlint/while-loop.test