From 6c79be71af8fa721348255dfd799336c956e9954 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 8 Aug 2005 17:19:57 +0000 Subject: 21576: test for 21575 --- Test/E01options.ztst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'Test') 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; } -- cgit 1.4.1