diff options
Diffstat (limited to 't/chainlint/cuddled-loop.test')
-rw-r--r-- | t/chainlint/cuddled-loop.test | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/chainlint/cuddled-loop.test b/t/chainlint/cuddled-loop.test new file mode 100644 index 0000000000..6fccb6ac22 --- /dev/null +++ b/t/chainlint/cuddled-loop.test @@ -0,0 +1,9 @@ +test_expect_success 'cuddled-loop' ' +# LINT: "while" loop cuddled with "(" and ")", with embedded (allowed) +# LINT: "|| exit {n}" to exit loop early, and using redirection "<" to feed +# LINT: loop; indented with spaces, not tabs +( while read x + do foobar bop || exit 1 + done <file ) && +outside subshell +' |