1
0
Fork 0
git/t/chainlint/for-loop.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

21 lines
343 B
Text

test_expect_success 'for-loop' '
(
# LINT: "for", "do", "done" do not need "&&"
for i in a b c
do
# LINT: missing "&&" on "echo"
echo $i
# LINT: last statement of while does not need "&&"
cat <<-\EOF
bar
EOF
# LINT: missing "&&" on "done"
done
# LINT: "do" on same line as "for"
for i in a b c; do
echo $i &&
cat $i
done
)
'