summaryrefslogtreecommitdiff
path: root/t/chainlint/bash-array.test
diff options
context:
space:
mode:
Diffstat (limited to 't/chainlint/bash-array.test')
-rw-r--r--t/chainlint/bash-array.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/chainlint/bash-array.test b/t/chainlint/bash-array.test
new file mode 100644
index 0000000000..4ca977d299
--- /dev/null
+++ b/t/chainlint/bash-array.test
@@ -0,0 +1,14 @@
+test_expect_success 'bash-array' '
+(
+ foo &&
+# LINT: ")" in Bash array assignment not misinterpreted as subshell-closing ")"
+ bar=(gumbo stumbo wumbo) &&
+ baz
+) &&
+(
+ foo &&
+# LINT: Bash array length operator not misinterpreted as comment
+ bar=${#bar[@]} &&
+ baz
+)
+'