diff options
Diffstat (limited to 'src/testdir/test_utf8.vim')
-rw-r--r-- | src/testdir/test_utf8.vim | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/testdir/test_utf8.vim b/src/testdir/test_utf8.vim index deb96ea4b0..df0abd354c 100644 --- a/src/testdir/test_utf8.vim +++ b/src/testdir/test_utf8.vim @@ -62,6 +62,9 @@ func Test_customlist_completion() call assert_equal('"Test3 N', getreg(':')) call garbagecollect(1) + delcommand Test1 + delcommand Test2 + delcommand Test3 endfunc " Yank one 3 byte character and check the mark columns. @@ -297,6 +300,40 @@ func Test_setcellwidths_dump() call StopVimInTerminal(buf) endfunc +" For some reason this test causes Test_customlist_completion() to fail on CI, +" so run it as the last test. +func Test_zz_ambiwidth_hl_dump() + CheckRunVimInTerminal + + let lines =<< trim END + call setline(1, [repeat("\u2103", 60), repeat("\u2103", 60)]) + set ambiwidth=single cursorline list display=lastline + END + call writefile(lines, 'XAmbiwidthHl', 'D') + let buf = RunVimInTerminal('-S XAmbiwidthHl', {'rows': 6, 'cols': 50}) + call VerifyScreenDump(buf, 'Test_ambiwidth_hl_dump_1', {}) + + call term_sendkeys(buf, ":set ambiwidth=double\<CR>") + call term_sendkeys(buf, ":echo\<CR>") + call VerifyScreenDump(buf, 'Test_ambiwidth_hl_dump_2', {}) + + call term_sendkeys(buf, ":set ambiwidth=single\<CR>") + call term_sendkeys(buf, ":echo\<CR>") + call VerifyScreenDump(buf, 'Test_ambiwidth_hl_dump_1', {}) + + if 0 " Enable after #14539 is fixed + call term_sendkeys(buf, ":call setcellwidths([[0x2103, 0x2103, 2]])\<CR>") + call term_sendkeys(buf, ":echo\<CR>") + call VerifyScreenDump(buf, 'Test_ambiwidth_hl_dump_2', {}) + + call term_sendkeys(buf, ":call setcellwidths([[0x2103, 0x2103, 1]])\<CR>") + call term_sendkeys(buf, ":echo\<CR>") + call VerifyScreenDump(buf, 'Test_ambiwidth_hl_dump_1', {}) + endif + + call StopVimInTerminal(buf) +endfunc + func Test_print_overlong() " Text with more composing characters than MB_MAXBYTES. new |