summaryrefslogtreecommitdiff
path: root/t/chainlint/one-liner-for-loop.test
diff options
context:
space:
mode:
Diffstat (limited to 't/chainlint/one-liner-for-loop.test')
-rw-r--r--t/chainlint/one-liner-for-loop.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/chainlint/one-liner-for-loop.test b/t/chainlint/one-liner-for-loop.test
new file mode 100644
index 0000000000..00afd7ef76
--- /dev/null
+++ b/t/chainlint/one-liner-for-loop.test
@@ -0,0 +1,12 @@
+test_expect_success 'one-liner-for-loop' '
+git init dir-rename-and-content &&
+(
+ cd dir-rename-and-content &&
+ test_write_lines 1 2 3 4 5 >foo &&
+ mkdir olddir &&
+# LINT: one-liner for-loop missing "|| exit"; also broken &&-chain
+ for i in a b c; do echo $i >olddir/$i; done
+ git add foo olddir &&
+ git commit -m "original" &&
+)
+'