summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-08-08 17:19:57 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-08-08 17:19:57 +0000
commit6c79be71af8fa721348255dfd799336c956e9954 (patch)
tree2f4aa1e3324fe44e2d2cfd097d972753c84d62ba
parent5587d05958c02913c47ce53b0e3636aa8e1fa88f (diff)
downloadzsh-6c79be71af8fa721348255dfd799336c956e9954.tar.gz
zsh-6c79be71af8fa721348255dfd799336c956e9954.zip
21576: test for 21575
-rw-r--r--ChangeLog2
-rw-r--r--Test/E01options.ztst20
2 files changed, 22 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c1d4243d3..cbb504f98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2005-08-08 Peter Stephenson <pws@csr.com>
+ * 21576: Test/E01options.ztst: test for 21575.
+
* unposted: Src/exec.c: removed unnecessary augment variable from
21575
diff --git a/Test/E01options.ztst b/Test/E01options.ztst
index 82b779850..da4020c15 100644
--- a/Test/E01options.ztst
+++ b/Test/E01options.ztst
@@ -975,6 +975,26 @@
>
?fn: foo: parameter not set
+ fn() {
+ emulate -L zsh
+ setopt warncreateglobal
+ foo1=bar1
+ unset foo1
+ foo1=bar2
+ local foo2=bar3
+ unset foo2
+ foo2=bar4
+ typeset -g foo3
+ foo3=bar5
+ fn2() {
+ foo3=bar6
+ }
+ }
+ fn
+0:WARN_CREATE_GLOBAL option
+?fn:3: scalar parameter foo1 created globally in function
+?fn:5: scalar parameter foo1 created globally in function
+
# This really just tests if XTRACE is egregiously broken.
# To test it properly would need a full set of its own.
fn() { print message; }