From 1acf23db3eceaae559328db68d6aae755edb0fb8 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sat, 5 Sep 2009 19:49:19 +0000 Subject: 27243: reverse indexing of arrays with beginning index out of range returned wrong value --- Test/D04parameter.ztst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'Test/D04parameter.ztst') diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index 358b46ef7..59fa3ac91 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -998,6 +998,34 @@ >sunny >day +# ' emacs likes this close quote + + a=(sping spang spong bumble) + print ${a[(i)spong]} + print ${a[(i)spung]} + print ${a[(ib.1.)spong]} + print ${a[(ib.4.)spong]} + print ${a[(ib.10.)spong]} +0:In and out of range reverse matched indices without and with b: arrays +>3 +>5 +>3 +>5 +>5 + + a="thrimblewuddlefrong" + print ${a[(i)w]} + print ${a[(i)x]} + print ${a[(ib.3.)w]} + print ${a[(ib.10.)w]} + print ${a[(ib.30.)w]} +0:In and out of range reverse matched indices without and with b: strings +>9 +>20 +>9 +>20 +>20 + foo="line:with::missing::fields:in:it" print -l ${(s.:.)foo} 0:Removal of empty fields in unquoted splitting -- cgit 1.4.1