blob: 7e8b68b46588b90c935a8c4fe7ad0d31c1bb126d [file] [log] [blame]
test_expect_success 'exit-loop' '
(
for i in a b c
do
# LINT: "|| exit {n}" valid for-loop escape in subshell; no "&&" needed
foo || exit 1
bar &&
baz
done
) &&
(
while true
do
# LINT: "|| exit {n}" valid while-loop escape in subshell; no "&&" needed
foo || exit 1
bar &&
baz
done
) &&
(
i=0 &&
while test $i -lt 10
do
# LINT: "|| exit" (sans exit code) valid escape in subshell; no "&&" needed
echo $i || exit
i=$(($i + 1))
done
)
'