| 1 | test_expect_success 'semicolon' ' |
| 2 | ( |
| 3 | # LINT: missing internal "&&" and ending "&&" |
| 4 | cat foo ; echo bar |
| 5 | # LINT: final statement before ")" only missing internal "&&" |
| 6 | cat foo ; echo bar |
| 7 | ) && |
| 8 | ( |
| 9 | # LINT: missing internal "&&" |
| 10 | cat foo ; echo bar && |
| 11 | cat foo ; echo bar |
| 12 | ) && |
| 13 | ( |
| 14 | # LINT: not fooled by semicolon in string |
| 15 | echo "foo; bar" && |
| 16 | cat foo; echo bar |
| 17 | ) && |
| 18 | ( |
| 19 | # LINT: semicolon unnecessary but legitimate |
| 20 | foo; |
| 21 | ) && |
| 22 | (cd foo && |
| 23 | for i in a b c; do |
| 24 | # LINT: semicolon unnecessary but legitimate |
| 25 | echo; |
| 26 | done) |
| 27 | ' |