summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-06-27 16:28:45 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-06-27 16:28:45 +0000
commitf95a6a913c885932827e9c0219221f7de7ccdd79 (patch)
tree88e6d63cc94c4d5f0b934e12e0ad6b399bda9660 /Test
parentec1274f0a3c7f4d65ba7d1cda95a209159ed9ad4 (diff)
downloadzsh-f95a6a913c885932827e9c0219221f7de7ccdd79.tar.gz
zsh-f95a6a913c885932827e9c0219221f7de7ccdd79.tar.xz
zsh-f95a6a913c885932827e9c0219221f7de7ccdd79.zip
22524: searchable parameter subscripts with multibyte chars,
a few other fixes
Diffstat (limited to 'Test')
-rw-r--r--Test/D07multibyte.ztst36
1 files changed, 36 insertions, 0 deletions
diff --git a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst
index 56d7fb7fd..a1937cc68 100644
--- a/Test/D07multibyte.ztst
+++ b/Test/D07multibyte.ztst
@@ -82,6 +82,42 @@
 >x
 >9 9 x t
 
+  s=é
+  print A${s[-2]}A B${s[-1]}B C${s[0]}C D${s[1]}D E${s[2]}E
+0:Out of range subscripts with multibyte characters
+>AA BéB CéC DéD EE
+
   print ${a[(i)é]} ${a[(I)é]} ${a[${a[(i)é]},${a[(I)é]}]}
 0:Reverse indexing with multibyte characters
 >2 4 éné
+
+  print ${a[(r)én,(r)éb]}
+0:Subscript searching with multibyte characters
+>énéb
+
+  print ${a[(rb:1:)é,-1]}
+  print ${a[(rb:2:)é,-1]}
+  print ${a[(rb:3:)é,-1]}
+  print ${a[(rb:4:)é,-1]}
+  print ${a[(rb:5:)é,-1]}
+0:Subscript searching with initial offset
+>énébreux
+>énébreux
+>ébreux
+>ébreux
+>
+
+  print ${a[(rn:1:)é,-1]}
+  print ${a[(rn:2:)é,-1]}
+  print ${a[(rn:3:)é,-1]}
+0:Subscript searching with count
+>énébreux
+>ébreux
+>
+
+  print ${a[(R)én,(R)éb]}
+0:Backward subscript searching with multibyte characters
+>énéb
+
+# Starting offsets with (R) seem to be so strange as to be hardly
+# worth testing.