Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: buggy WARN_CREATE_GLOBAL warning



These tests could probably do with some more cases.

pws

diff --git a/Test/E01options.ztst b/Test/E01options.ztst
index c9427c7..f270767 100644
--- a/Test/E01options.ztst
+++ b/Test/E01options.ztst
@@ -1120,6 +1120,15 @@
 ?fn:5: scalar parameter foo1 created globally in function fn
 ?fn:15: numeric parameter foo5 created globally in function fn
 
+  fn() {
+    emulate -L zsh
+    setopt warncreateglobal
+    TZ=UTC date >&/dev/null
+    local um=$(TZ=UTC date 2>/dev/null)
+  }
+  fn
+0:WARN_CREATE_GLOBAL negative cases
+
 # This really just tests if XTRACE is egregiously broken.
 # To test it properly would need a full set of its own.
   fn() { print message; }



Messages sorted by: Reverse Date, Date, Thread, Author