1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-19 11:31:26 +01:00

37303: test WARN_CREATE_GLOBAL negative cases.

This commit is contained in:
Peter Stephenson 2015-12-04 11:24:21 +00:00
parent e40a14c5e4
commit dc8c39efff

View file

@ -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; }