about summary refs log tree commit diff
path: root/Test/D04parameter.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-09-05 19:49:19 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-09-05 19:49:19 +0000
commit1acf23db3eceaae559328db68d6aae755edb0fb8 (patch)
tree38e42f719e3a3671d1850023ecc5e13d7a40ee41 /Test/D04parameter.ztst
parent6d4d1261a5c813033f01e90c708c0dcfbc7e1b6e (diff)
downloadzsh-1acf23db3eceaae559328db68d6aae755edb0fb8.tar.gz
zsh-1acf23db3eceaae559328db68d6aae755edb0fb8.tar.xz
zsh-1acf23db3eceaae559328db68d6aae755edb0fb8.zip
27243: reverse indexing of arrays with beginning index out of range returned
wrong value
Diffstat (limited to 'Test/D04parameter.ztst')
-rw-r--r--Test/D04parameter.ztst28
1 files changed, 28 insertions, 0 deletions
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