summaryrefslogtreecommitdiffstats
path: root/tests/varenv11.sub
diff options
context:
space:
mode:
Diffstat (limited to 'tests/varenv11.sub')
-rw-r--r--tests/varenv11.sub30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/varenv11.sub b/tests/varenv11.sub
new file mode 100644
index 0000000..d438498
--- /dev/null
+++ b/tests/varenv11.sub
@@ -0,0 +1,30 @@
+# couple of errors here
+func()
+{
+ local qux=7
+ local qux=(one two)
+ local what=(zero one two)
+}
+
+readonly qux=42
+func
+
+func2()
+{
+ declare -gA foo=([zero]=zero [one]=one)
+ declare -ga bar=(zero one)
+}
+
+foo=help
+bar=me
+
+func2
+
+declare -p foo bar
+unset foo bar
+func2
+declare -p foo bar
+
+readonly a=7
+a=(1 2 3)
+