summaryrefslogtreecommitdiffstats
path: root/t/chainlint/complex-if-in-cuddled-loop.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 09:49:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 09:49:36 +0000
commit5ec6074f0633939fd17d94111d10c6c6b062978c (patch)
treebfaa17b5a64abc66c918e9c70969e519d9e1df8e /t/chainlint/complex-if-in-cuddled-loop.test
parentInitial commit. (diff)
downloadgit-8c76a719c62c2f3aec291063b6d4d5aaaab1c4ee.tar.xz
git-8c76a719c62c2f3aec291063b6d4d5aaaab1c4ee.zip
Adding upstream version 1:2.30.2.upstream/1%2.30.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/chainlint/complex-if-in-cuddled-loop.test')
-rw-r--r--t/chainlint/complex-if-in-cuddled-loop.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/chainlint/complex-if-in-cuddled-loop.test b/t/chainlint/complex-if-in-cuddled-loop.test
new file mode 100644
index 0000000..571bbd8
--- /dev/null
+++ b/t/chainlint/complex-if-in-cuddled-loop.test
@@ -0,0 +1,11 @@
+# LINT: 'for' loop cuddled with "(" and ")" and nested 'if' with complex
+# LINT: multi-line condition; indented with spaces, not tabs
+(for i in a b c; do
+ if test "$(echo $(waffle bat))" = "eleventeen" &&
+ test "$x" = "$y"; then
+ :
+ else
+ echo >file
+ fi
+ done) &&
+test ! -f file