| 1 | test_expect_success 'case' ' |
| 2 | ( |
| 3 | # LINT: "...)" arms in "case" not misinterpreted as subshell-closing ")" |
| 4 | case "$x" in |
| 5 | x) foo ;; |
| 6 | *) bar ;; |
| 7 | esac && |
| 8 | foobar |
| 9 | ) && |
| 10 | ( |
| 11 | # LINT: missing "&&" on "esac" |
| 12 | case "$x" in |
| 13 | x) foo ;; |
| 14 | *) bar ;; |
| 15 | esac |
| 16 | foobar |
| 17 | ) && |
| 18 | ( |
| 19 | # LINT: "...)" arm in one-liner "case" not misinterpreted as closing ")" |
| 20 | case "$x" in 1) true;; esac && |
| 21 | # LINT: same but missing "&&" |
| 22 | case "$y" in 2) false;; esac |
| 23 | foobar |
| 24 | ) |
| 25 | ' |