Squashed 'third_party/git/' content from commit cb71568594
git-subtree-dir: third_party/git git-subtree-split: cb715685942260375e1eb8153b0768a376e4ece7
This commit is contained in:
commit
1b593e1ea4
3629 changed files with 1139935 additions and 0 deletions
28
t/chainlint/if-then-else.test
Normal file
28
t/chainlint/if-then-else.test
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
(
|
||||
# LINT: 'if', 'then', 'elif', 'else', 'fi' do not need "&&"
|
||||
if test -n ""
|
||||
then
|
||||
# LINT: missing "&&" on 'echo'
|
||||
echo very
|
||||
# LINT: last statement before 'elif' does not need "&&"
|
||||
echo empty
|
||||
elif test -z ""
|
||||
# LINT: last statement before 'else' does not need "&&"
|
||||
echo foo
|
||||
else
|
||||
echo foo &&
|
||||
# LINT: last statement before 'fi' does not need "&&"
|
||||
cat <<-\EOF
|
||||
bar
|
||||
EOF
|
||||
# LINT: missing "&&" on 'fi'
|
||||
fi
|
||||
echo poodle
|
||||
) &&
|
||||
(
|
||||
# LINT: 'then' on same line as 'if'
|
||||
if test -n ""; then
|
||||
echo very &&
|
||||
echo empty
|
||||
if
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue