1
0
Fork 0
git/t/chainlint/while-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
344 B
Text

test_expect_success 'while-loop' '
(
# LINT: "while", "do", "done" do not need "&&"
while true
do
# LINT: missing "&&" on "echo"
echo foo
# LINT: last statement of while does not need "&&"
cat <<-\EOF
bar
EOF
# LINT: missing "&&" on "done"
done
# LINT: "do" on same line as "while"
while true; do
echo foo &&
cat bar
done
)
'