summaryrefslogtreecommitdiff
path: root/Shell/Tests/function.sh
diff options
context:
space:
mode:
Diffstat (limited to 'Shell/Tests/function.sh')
-rw-r--r--Shell/Tests/function.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/Shell/Tests/function.sh b/Shell/Tests/function.sh
index f3ef5aaeed..b9c23308ea 100644
--- a/Shell/Tests/function.sh
+++ b/Shell/Tests/function.sh
@@ -34,3 +34,8 @@ fn() {
fn2() { }
test "$(fn foobar)" = "foobar" || echo 'Frames are somehow messed up in nested functions' && exit 1
+
+fn(xfoo) { }
+xfoo=1
+fn 2
+test $xfoo -eq 1 || echo 'Functions overwrite parent scopes' && exit 1