diff options
Diffstat (limited to 't/chainlint/while-loop.test')
-rw-r--r-- | t/chainlint/while-loop.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/chainlint/while-loop.test b/t/chainlint/while-loop.test new file mode 100644 index 0000000000..33a201906a --- /dev/null +++ b/t/chainlint/while-loop.test @@ -0,0 +1,21 @@ +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 +) +' |