aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_utf8.vim
diff options
context:
space:
mode:
Diffstat (limited to 'test/old/testdir/test_utf8.vim')
-rw-r--r--test/old/testdir/test_utf8.vim15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/old/testdir/test_utf8.vim b/test/old/testdir/test_utf8.vim
index 00b060a9e2..a5a9624ec3 100644
--- a/test/old/testdir/test_utf8.vim
+++ b/test/old/testdir/test_utf8.vim
@@ -88,7 +88,20 @@ func Test_screenchar_utf8()
call assert_equal("B", screenstring(1, 2))
call assert_equal("C\u0308", screenstring(1, 3))
- " 2-cells, with composing characters
+ " 1-cell, with 6 composing characters
+ set maxcombine=6
+ call setline(1, ["ABC" .. repeat("\u0308", 6)])
+ redraw
+ call assert_equal([0x0041], screenchars(1, 1))
+ call assert_equal([0x0042], 1->screenchars(2))
+ " This should not use uninitialized memory
+ call assert_equal([0x0043] + repeat([0x0308], 6), screenchars(1, 3))
+ call assert_equal("A", screenstring(1, 1))
+ call assert_equal("B", screenstring(1, 2))
+ call assert_equal("C" .. repeat("\u0308", 6), screenstring(1, 3))
+ set maxcombine&
+
+ " 2-cells, with composing characters
let text = "\u3042\u3044\u3046\u3099"
call setline(1, text)
redraw