t / chainlint / if-then-else.teston commit chainlint: fix for core.autocrlf=true (1ce2b45)
   1(
   2# LINT: 'if', 'then', 'elif', 'else', 'fi' do not need "&&"
   3        if test -n ""
   4        then
   5# LINT: missing "&&" on 'echo'
   6                echo very
   7# LINT: last statement before 'elif' does not need "&&"
   8                echo empty
   9        elif test -z ""
  10# LINT: last statement before 'else' does not need "&&"
  11                echo foo
  12        else
  13                echo foo &&
  14# LINT: last statement before 'fi' does not need "&&"
  15                cat <<-\EOF
  16                bar
  17                EOF
  18# LINT: missing "&&" on 'fi'
  19        fi
  20        echo poodle
  21) &&
  22(
  23# LINT: 'then' on same line as 'if'
  24        if test -n ""; then
  25                echo very &&
  26                echo empty
  27        if
  28)