From d946f22a4cd2eed0f3a67881cfa57c805703929c Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 14 Aug 2019 15:16:59 +0100 Subject: 44664: Fix problem with temporary assignment. "foo=bar builtin" inside a function lost any variable from enclosing scope. --- Test/D04parameter.ztst | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Test') diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index 194c3e287..b6e85a9fe 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -2522,3 +2522,15 @@ F:behavior, see http://austingroupbugs.net/view.php?id=888 >trailing/slashes >removed >are/removed + + foo=global-value + fn() { + local foo=function-value + foo=export-value true + print $foo + } + fn + print $foo +0:Global variables are not trashed by "foo=bar builtin" (regression test) +>function-value +>global-value -- cgit 1.4.1