summaryrefslogtreecommitdiff
path: root/src/testdir/test69.in
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-11-02 23:29:26 +0100
committerBram Moolenaar <Bram@vim.org>2013-11-02 23:29:26 +0100
commit0ffbbf9ea871dd64c2be933d6718f0b34fe960c4 (patch)
treecc8d2df9e03eca6b8a9c20f4c6f821c4f32525b2 /src/testdir/test69.in
parent4cc95d1495706593d30ce2fae3fc592a2ffdaab8 (diff)
downloadvim-git-0ffbbf9ea871dd64c2be933d6718f0b34fe960c4.tar.gz
updated for version 7.4.057v7.4.057
Problem: byteidx() does not work for composing characters. Solution: Add byteidxcomp().
Diffstat (limited to 'src/testdir/test69.in')
-rw-r--r--src/testdir/test69.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test69.in b/src/testdir/test69.in
index 9558cb817..f18ee3790 100644
--- a/src/testdir/test69.in
+++ b/src/testdir/test69.in
@@ -1,6 +1,7 @@
Test for multi-byte text formatting.
Also test, that 'mps' with multibyte chars works.
And test "ra" on multi-byte characters.
+Also test byteidx() and byteidxcomp()
STARTTEST
:so mbyte.vim
@@ -154,6 +155,21 @@ ra test
aab
STARTTEST
+:let a = '.é.' " one char of two bytes
+:let b = '.é.' " normal e with composing char
+/^byteidx
+:put =string([byteidx(a, 0), byteidx(a, 1), byteidx(a, 2), byteidx(a, 3), byteidx(a, 4)])
+:put =string([byteidx(b, 0), byteidx(b, 1), byteidx(b, 2), byteidx(b, 3), byteidx(b, 4)])
+/^byteidxcomp
+:put =string([byteidxcomp(a, 0), byteidxcomp(a, 1), byteidxcomp(a, 2), byteidxcomp(a, 3), byteidxcomp(a, 4)])
+:let b = '.é.'
+:put =string([byteidxcomp(b, 0), byteidxcomp(b, 1), byteidxcomp(b, 2), byteidxcomp(b, 3), byteidxcomp(b, 4), byteidxcomp(b, 5)])
+ENDTEST
+
+byteidx
+byteidxcomp
+
+STARTTEST
:g/^STARTTEST/.,/^ENDTEST/d
:1;/^Results/,$wq! test.out
ENDTEST