mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-10 12:40:58 +02:00
37303: test WARN_CREATE_GLOBAL negative cases.
This commit is contained in:
parent
e40a14c5e4
commit
dc8c39efff
1 changed files with 9 additions and 0 deletions
|
@ -1120,6 +1120,15 @@
|
||||||
?fn:5: scalar parameter foo1 created globally in function fn
|
?fn:5: scalar parameter foo1 created globally in function fn
|
||||||
?fn:15: numeric parameter foo5 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.
|
# This really just tests if XTRACE is egregiously broken.
|
||||||
# To test it properly would need a full set of its own.
|
# To test it properly would need a full set of its own.
|
||||||
fn() { print message; }
|
fn() { print message; }
|
||||||
|
|
Loading…
Reference in a new issue