about summary refs log tree commit diff
path: root/third_party/git/t/chainlint/cuddled-loop.test
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/t/chainlint/cuddled-loop.test')
-rw-r--r--third_party/git/t/chainlint/cuddled-loop.test7
1 files changed, 7 insertions, 0 deletions
diff --git a/third_party/git/t/chainlint/cuddled-loop.test b/third_party/git/t/chainlint/cuddled-loop.test
new file mode 100644
index 0000000000..a841d781f0
--- /dev/null
+++ b/third_party/git/t/chainlint/cuddled-loop.test
@@ -0,0 +1,7 @@
+# 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