summaryrefslogtreecommitdiffstats
path: root/Test/B02typeset.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-06-25 17:01:48 +0100
committerPeter Stephenson <pws@zsh.org>2015-06-25 17:01:48 +0100
commitb16d754d9cc36b5bcf506d95621ad3bd69238ab7 (patch)
tree21314d7fb8b935faf863aa3040b573c4bec886d2 /Test/B02typeset.ztst
parent35550: fix backspace in interactive menu-select (diff)
downloadzsh-b16d754d9cc36b5bcf506d95621ad3bd69238ab7.tar
zsh-b16d754d9cc36b5bcf506d95621ad3bd69238ab7.tar.gz
zsh-b16d754d9cc36b5bcf506d95621ad3bd69238ab7.tar.bz2
zsh-b16d754d9cc36b5bcf506d95621ad3bd69238ab7.tar.lz
zsh-b16d754d9cc36b5bcf506d95621ad3bd69238ab7.tar.xz
zsh-b16d754d9cc36b5bcf506d95621ad3bd69238ab7.tar.zst
zsh-b16d754d9cc36b5bcf506d95621ad3bd69238ab7.zip
35604: create empty arrays in typeset with array=()
Diffstat (limited to 'Test/B02typeset.ztst')
-rw-r--r--Test/B02typeset.ztst13
1 files changed, 13 insertions, 0 deletions
diff --git a/Test/B02typeset.ztst b/Test/B02typeset.ztst
index e6285bc05..1548b817b 100644
--- a/Test/B02typeset.ztst
+++ b/Test/B02typeset.ztst
@@ -663,3 +663,16 @@
>fn2 () {
> typeset assignfirst=(why not)
>}
+
+ fn() {
+ typeset array=()
+ print ${(t)array} ${#array}
+ typeset gnothergarray=() gnothergarray[1]=yes gnothergarray[2]=no
+ print -l ${(t)gnothergarray} $gnothergarray
+ }
+ fn
+0:can set empty array
+>array-local 0
+>array-local
+>yes
+>no