Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/chainlint/if-then-else.test # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / chainlint / if-then-else.test` 31 lines ยท 568 bytes Raw Blame History 1 test_expect_success 'if-then-else' ' 2 ( 3 # LINT: "if", "then", "elif", "else", "fi" do not need "&&" 4 if test -n "" 5 then 6 # LINT: missing "&&" on "echo" 7 echo very 8 # LINT: last statement before "elif" does not need "&&" 9 echo empty 10 elif test -z "" 11 then 12 # LINT: last statement before "else" does not need "&&" 13 echo foo 14 else 15 echo foo && 16 # LINT: last statement before "fi" does not need "&&" 17 cat <<-\EOF 18 bar 19 EOF 20 # LINT: missing "&&" on "fi" 21 fi 22 echo poodle 23 ) && 24 ( 25 # LINT: "then" on same line as "if" 26 if test -n ""; then 27 echo very && 28 echo empty 29 fi 30 ) 31 '