2024-07-10 02:34:48 -06:00
|
|
|
test_expect_success 'if-in-loop' '
|
2018-07-11 00:46:41 -06:00
|
|
|
(
|
|
|
|
for i in a b c
|
|
|
|
do
|
|
|
|
if false
|
|
|
|
then
|
2022-08-31 18:29:49 -06:00
|
|
|
# LINT: missing "&&" on "echo" okay since "exit 1" signals error explicitly
|
2018-07-11 00:46:41 -06:00
|
|
|
echo "err"
|
|
|
|
exit 1
|
2021-12-12 23:30:46 -07:00
|
|
|
# LINT: missing "&&" on "fi"
|
2018-07-11 00:46:41 -06:00
|
|
|
fi
|
|
|
|
foo
|
2021-12-12 23:30:46 -07:00
|
|
|
# LINT: missing "&&" on "done"
|
2018-07-11 00:46:41 -06:00
|
|
|
done
|
|
|
|
bar
|
|
|
|
)
|
2024-07-10 02:34:48 -06:00
|
|
|
'
|