1
0
Fork 0
git/t/chainlint/case.test
Daniel Baumann 54102a2c29
Adding upstream version 1:2.47.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-23 07:43:39 +02:00

25 lines
429 B
Text

test_expect_success 'case' '
(
# LINT: "...)" arms in "case" not misinterpreted as subshell-closing ")"
case "$x" in
x) foo ;;
*) bar ;;
esac &&
foobar
) &&
(
# LINT: missing "&&" on "esac"
case "$x" in
x) foo ;;
*) bar ;;
esac
foobar
) &&
(
# LINT: "...)" arm in one-liner "case" not misinterpreted as closing ")"
case "$x" in 1) true;; esac &&
# LINT: same but missing "&&"
case "$y" in 2) false;; esac
foobar
)
'