mirror of
https://github.com/git/git
synced 2024-10-30 04:01:21 +00:00
5459bc1bbb
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>
19 lines
308 B
Text
19 lines
308 B
Text
(
|
|
# LINT: "for", "do", "done" do not need "&&"
|
|
for i in a b c
|
|
do
|
|
# LINT: missing "&&" on "echo"
|
|
echo $i
|
|
# LINT: last statement of while does not need "&&"
|
|
cat <<-\EOF
|
|
bar
|
|
EOF
|
|
# LINT: missing "&&" on "done"
|
|
done
|
|
|
|
# LINT: "do" on same line as "for"
|
|
for i in a b c; do
|
|
echo $i &&
|
|
cat $i
|
|
done
|
|
)
|