summaryrefslogtreecommitdiffstats
path: root/tests/assoc7.sub
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/assoc7.sub16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/assoc7.sub b/tests/assoc7.sub
new file mode 100644
index 0000000..5bc5150
--- /dev/null
+++ b/tests/assoc7.sub
@@ -0,0 +1,16 @@
+# problem with bash versions through bash-4.2
+foo()
+{
+ declare -A hash
+ declare hash[baz]=bar #bash crashes here
+
+ echo ${hash[@]}
+}
+
+foo
+
+declare -a ary
+printf -v ary[0] "%b" ""
+echo "after printf"
+x="${ary[*]}" # segfaults here
+echo "after use: $?"