diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-10-05 07:25:30 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-05 07:25:30 +0800 |
| commit | 759259e8af2f6f5e840fcbd687caaaf5f2b9b676 (patch) | |
| tree | cedc2681f83934bc007134b862f24d1bc41bec0c /src/nvim/testdir | |
| parent | 6abb48105135ce3ae7eda22334f8104c5ddf20ce (diff) | |
| parent | 98bb2c19309ced1131afce4fc2cdae518d0a2dcd (diff) | |
| download | rneovim-759259e8af2f6f5e840fcbd687caaaf5f2b9b676.tar.gz rneovim-759259e8af2f6f5e840fcbd687caaaf5f2b9b676.tar.bz2 rneovim-759259e8af2f6f5e840fcbd687caaaf5f2b9b676.zip | |
Merge pull request #20490 from zeertzjq/vim-9.0.0656
vim-patch:9.0.{0656,0661}: 'fillchars' "lastline"
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_display.vim | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/src/nvim/testdir/test_display.vim b/src/nvim/testdir/test_display.vim index 217bb5d781..13796449ab 100644 --- a/src/nvim/testdir/test_display.vim +++ b/src/nvim/testdir/test_display.vim @@ -407,30 +407,49 @@ func Test_display_linebreak_breakat() let &breakat=_breakat endfunc -func Test_display_lastline() - CheckScreendump - +func Run_Test_display_lastline(euro) let lines =<< trim END - call setline(1, ['aaa', 'b'->repeat(100)]) + call setline(1, ['aaa', 'b'->repeat(200)]) set display=truncate + vsplit 100wincmd < END - call writefile(lines, 'XdispLastline') + if a:euro != '' + let lines[2] = 'set fillchars=vert:\|,lastline:€' + endif + call writefile(lines, 'XdispLastline', 'D') let buf = RunVimInTerminal('-S XdispLastline', #{rows: 10}) - call VerifyScreenDump(buf, 'Test_display_lastline_1', {}) + call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}1', {}) call term_sendkeys(buf, ":set display=lastline\<CR>") - call VerifyScreenDump(buf, 'Test_display_lastline_2', {}) + call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}2', {}) call term_sendkeys(buf, ":100wincmd >\<CR>") - call VerifyScreenDump(buf, 'Test_display_lastline_3', {}) + call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}3', {}) call term_sendkeys(buf, ":set display=truncate\<CR>") - call VerifyScreenDump(buf, 'Test_display_lastline_4', {}) + call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}4', {}) + + call term_sendkeys(buf, ":close\<CR>") + call term_sendkeys(buf, ":3split\<CR>") + call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}5', {}) + + call term_sendkeys(buf, ":close\<CR>") + call term_sendkeys(buf, ":2vsplit\<CR>") + call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}6', {}) call StopVimInTerminal(buf) - call delete('XdispLastline') +endfunc + +func Test_display_lastline() + CheckScreendump + + call Run_Test_display_lastline('') + call Run_Test_display_lastline('euro_') + + call assert_fails(':set fillchars=lastline:', 'E474:') + call assert_fails(':set fillchars=lastline:〇', 'E474:') endfunc |