interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / t / chainlint / case.test

25 lines · 429 bytes Raw Blame History
1test_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'