summaryrefslogtreecommitdiffstats
path: root/tests/builtins3.sub
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/builtins3.sub14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/builtins3.sub b/tests/builtins3.sub
new file mode 100644
index 0000000..5596c56
--- /dev/null
+++ b/tests/builtins3.sub
@@ -0,0 +1,14 @@
+# declare -g added in bash-4.2
+f=4
+
+foo()
+{
+ declare -g f=8
+ declare -g bar=4
+
+ echo inside
+}
+
+echo before: f = $f
+foo
+echo after: f = $f bar = $bar