diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2021-12-13 09:30:46 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-14 01:15:28 +0300 |
commit | 5459bc1bbb54536df18b034afd390f899bda37be (patch) | |
tree | 21cb3b85054bcca224617cae862c50ceff4765ce /t/chainlint/multi-line-string.test | |
parent | 925d7304d2a5f5dda9fbe3f541338bb87083f6b2 (diff) |
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>
Diffstat (limited to 't/chainlint/multi-line-string.test')
-rw-r--r-- | t/chainlint/multi-line-string.test | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/t/chainlint/multi-line-string.test b/t/chainlint/multi-line-string.test index 287ab89705..4a0af2107d 100644 --- a/t/chainlint/multi-line-string.test +++ b/t/chainlint/multi-line-string.test @@ -3,25 +3,13 @@ line 2 line 3" && # LINT: missing "&&" on assignment - y='line 1 - line2' + y="line 1 + line2" foobar ) && ( -# LINT: apostrophe (in a contraction) within string not misinterpreted as -# LINT: starting multi-line single-quoted string - echo "there's nothing to see here" && - exit -) && -( echo "xyz" "abc def ghi" && - echo 'xyz' 'abc - def - ghi' && - echo 'xyz' "abc - def - ghi" && barfoo ) |