From b16d754d9cc36b5bcf506d95621ad3bd69238ab7 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 25 Jun 2015 17:01:48 +0100 Subject: 35604: create empty arrays in typeset with array=() --- Test/B02typeset.ztst | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Test') 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 -- cgit 1.4.1