summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-06-28 13:12:55 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-06-28 13:12:55 +0000
commit6157c14d0602c698aa9ebfac9a2135ef095a76b4 (patch)
treecae7cb80281a1426c06734889fd8f0b83292c6ca /Test
parentf95a6a913c885932827e9c0219221f7de7ccdd79 (diff)
downloadzsh-6157c14d0602c698aa9ebfac9a2135ef095a76b4.tar.gz
zsh-6157c14d0602c698aa9ebfac9a2135ef095a76b4.tar.xz
zsh-6157c14d0602c698aa9ebfac9a2135ef095a76b4.zip
22525: lengths and cases of multibyte strings in parameters and history
Diffstat (limited to 'Test')
-rw-r--r--Test/D07multibyte.ztst34
1 files changed, 34 insertions, 0 deletions
diff --git a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst
index a1937cc68..4d364d879 100644
--- a/Test/D07multibyte.ztst
+++ b/Test/D07multibyte.ztst
@@ -121,3 +121,37 @@
 
 # Starting offsets with (R) seem to be so strange as to be hardly
 # worth testing.
+
+  setopt extendedglob
+  [[ $a = (#b)t(én)(éb)reux ]] || print "Failed to match." >&2
+  for i in {1..${#match}}; do
+    print $match[i] $mbegin[i] $mend[i] ${a[$mbegin[i],$mend[i]]}
+  done
+0:Multibyte offsets in pattern tests
+>én 2 3 én
+>éb 4 5 éb
+
+  b=${(U)a}
+  print $b
+  print ${(L)b}
+  desdichado="Je suis le $a, le veuf, l'inconsolé"
+  print ${(C)desdichado}
+  lxiv="l'état c'est moi"
+  print ${(C)lxiv}
+0:Case modification of multibyte strings
+>TÉNÉBREUX
+>ténébreux
+>Je Suis Le Ténébreux, Le Veuf, L'Inconsolé
+>L'État C'Est Moi
+
+  array=(ølaf ødd øpened án encyclopædia)
+  barray=(${(U)array})
+  print $barray
+  print ${(L)barray}
+  print ${(C)array}
+  print ${(C)barray}
+0:Case modification of arrays with multibyte strings
+>ØLAF ØDD ØPENED ÁN ENCYCLOPÆDIA
+>ølaf ødd øpened án encyclopædia
+>Ølaf Ødd Øpened Án Encyclopædia
+>Ølaf Ødd Øpened Án Encyclopædia