aboutsummaryrefslogtreecommitdiffstats
path: root/t/chainlint/return-loop.test
diff options
context:
space:
mode:
Diffstat (limited to 't/chainlint/return-loop.test')
-rw-r--r--t/chainlint/return-loop.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/chainlint/return-loop.test b/t/chainlint/return-loop.test
new file mode 100644
index 0000000000..ea76c3593a
--- /dev/null
+++ b/t/chainlint/return-loop.test
@@ -0,0 +1,8 @@
+test_expect_success 'return-loop' '
+while test $i -lt $((num - 5))
+do
+# LINT: "|| return {n}" valid loop escape outside subshell; no "&&" needed
+ git notes add -m "notes for commit$i" HEAD~$i || return 1
+ i=$((i + 1))
+done
+'