summaryrefslogtreecommitdiffstats
path: root/Test/E01options.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-06-18 14:54:41 +0100
committerPeter Stephenson <pws@zsh.org>2015-06-24 10:21:12 +0100
commit39b28980f38e83e15cdeb19a489b5659af97fe93 (patch)
treee68f09fc59fc7008ff732704cbabed7e3df5f188 /Test/E01options.ztst
parent35573: turn off POSIX_BUILTINS in completion. (diff)
downloadzsh-39b28980f38e83e15cdeb19a489b5659af97fe93.tar
zsh-39b28980f38e83e15cdeb19a489b5659af97fe93.tar.gz
zsh-39b28980f38e83e15cdeb19a489b5659af97fe93.tar.bz2
zsh-39b28980f38e83e15cdeb19a489b5659af97fe93.tar.lz
zsh-39b28980f38e83e15cdeb19a489b5659af97fe93.tar.xz
zsh-39b28980f38e83e15cdeb19a489b5659af97fe93.tar.zst
zsh-39b28980f38e83e15cdeb19a489b5659af97fe93.zip
various posts: Implement assignment parsing for typeset.
Typeset assignments now work like raw assignments except for no "+=" and no GLOB_ASSIGN. Documented in typeset builtin doc and mentioned in release notes. Tests to ensure basic sanity. Enabled by default, can be turned off by "disable -r" with typeset family of commands.
Diffstat (limited to 'Test/E01options.ztst')
-rw-r--r--Test/E01options.ztst11
1 files changed, 11 insertions, 0 deletions
diff --git a/Test/E01options.ztst b/Test/E01options.ztst
index d64f7ac68..ca3f06ca8 100644
--- a/Test/E01options.ztst
+++ b/Test/E01options.ztst
@@ -570,6 +570,15 @@
>unset
>globassign
+ # This test is now somewhat artificial as
+ # KSH_TYPESET only applies to the builtin
+ # interface. Tests to the more standard
+ # reserved word interface appear elsewhere.
+ (
+ # reserved words are handled during parsing,
+ # hence eval...
+ disable -r typeset
+ eval '
setopt kshtypeset
ktvars=(ktv1 ktv2)
typeset ktfoo=`echo arg1 arg2` $ktvars
@@ -580,6 +589,8 @@
print $noktfoo
print $+noktarg1 $+noktarg2
unset ktfoo ktv1 ktv2 noktfoo noktarg2
+ '
+ )
0:KSH_TYPESET option
>1 1 0
>arg1 arg2