summaryrefslogtreecommitdiff
path: root/t/chainlint/if-then-else.test
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-12-22 22:48:11 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-12-22 22:48:11 -0800
commitd52da628013ad333e056432057da8b61042c6cfc (patch)
tree3697116d393edc66304d0e3bf7e73b0262e9d960 /t/chainlint/if-then-else.test
parentMerge branch 'jz/apply-quiet-and-allow-empty' (diff)
parentchainlint.sed: stop splitting "(..." into separate lines "(" and "..." (diff)
downloadtgif-d52da628013ad333e056432057da8b61042c6cfc.tar.xz
Merge branch 'es/chainlint'
The chainlint test script linter in the test suite has been updated. * es/chainlint: chainlint.sed: stop splitting "(..." into separate lines "(" and "..." chainlint.sed: swallow comments consistently chainlint.sed: stop throwing away here-doc tags chainlint.sed: don't mistake `<< word` in string as here-doc operator chainlint.sed: make here-doc "<<-" operator recognition more POSIX-like chainlint.sed: drop subshell-closing ">" annotation chainlint.sed: drop unnecessary distinction between ?!AMP?! and ?!SEMI?! chainlint.sed: tolerate harmless ";" at end of last line in block chainlint.sed: improve ?!SEMI?! placement accuracy chainlint.sed: improve ?!AMP?! placement accuracy t/Makefile: optimize chainlint self-test t/chainlint/one-liner: avoid overly intimate chainlint.sed knowledge t/chainlint/*.test: generalize self-test commentary t/chainlint/*.test: fix invalid test cases due to mixing quote types t/chainlint/*.test: don't use invalid shell syntax
Diffstat (limited to 't/chainlint/if-then-else.test')
-rw-r--r--t/chainlint/if-then-else.test17
1 files changed, 9 insertions, 8 deletions
diff --git a/t/chainlint/if-then-else.test b/t/chainlint/if-then-else.test
index 9bd8e9a4c6..2055336c2b 100644
--- a/t/chainlint/if-then-else.test
+++ b/t/chainlint/if-then-else.test
@@ -1,28 +1,29 @@
(
-# LINT: 'if', 'then', 'elif', 'else', 'fi' do not need "&&"
+# LINT: "if", "then", "elif", "else", "fi" do not need "&&"
if test -n ""
then
-# LINT: missing "&&" on 'echo'
+# LINT: missing "&&" on "echo"
echo very
-# LINT: last statement before 'elif' does not need "&&"
+# LINT: last statement before "elif" does not need "&&"
echo empty
elif test -z ""
-# LINT: last statement before 'else' does not need "&&"
+ then
+# LINT: last statement before "else" does not need "&&"
echo foo
else
echo foo &&
-# LINT: last statement before 'fi' does not need "&&"
+# LINT: last statement before "fi" does not need "&&"
cat <<-\EOF
bar
EOF
-# LINT: missing "&&" on 'fi'
+# LINT: missing "&&" on "fi"
fi
echo poodle
) &&
(
-# LINT: 'then' on same line as 'if'
+# LINT: "then" on same line as "if"
if test -n ""; then
echo very &&
echo empty
- if
+ fi
)