diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-03-08 12:11:07 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-08 12:11:07 +0800 |
| commit | be368a6f7489becf463900bd88239cca6e64f37d (patch) | |
| tree | ae283877ddf1dc62303e7ffff558447e0c774309 /src/nvim/testdir/test_excmd.vim | |
| parent | 6e31a3a51e686c80b9dbb2d4f151b0ae68bf0435 (diff) | |
| parent | c624f260d37f1fea8c105c140fcb5157730355df (diff) | |
Merge pull request #17647 from neovim/backport-16851-to-release-0.6release-0.6
[Backport release-0.6] vim-patch:8.2.3952: first line not redrawn when adding lines to an empty buffer
Diffstat (limited to 'src/nvim/testdir/test_excmd.vim')
| -rw-r--r-- | src/nvim/testdir/test_excmd.vim | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_excmd.vim b/src/nvim/testdir/test_excmd.vim index 2d01cbba83..1c053c824f 100644 --- a/src/nvim/testdir/test_excmd.vim +++ b/src/nvim/testdir/test_excmd.vim @@ -1,6 +1,8 @@ " Tests for various Ex commands. source check.vim +source shared.vim +source term_util.vim func Test_ex_delete() new @@ -122,6 +124,27 @@ func Test_append_cmd() close! endfunc +func Test_append_cmd_empty_buf() + CheckRunVimInTerminal + let lines =<< trim END + func Timer(timer) + append + aaaaa + bbbbb + . + endfunc + call timer_start(10, 'Timer') + END + call writefile(lines, 'Xtest_append_cmd_empty_buf') + let buf = RunVimInTerminal('-S Xtest_append_cmd_empty_buf', {'rows': 6}) + call WaitForAssert({-> assert_equal('bbbbb', term_getline(buf, 2))}) + call WaitForAssert({-> assert_equal('aaaaa', term_getline(buf, 1))}) + + " clean up + call StopVimInTerminal(buf) + call delete('Xtest_append_cmd_empty_buf') +endfunc + " Test for the :insert command func Test_insert_cmd() set noautoindent " test assumes noautoindent, but it's on by default in Nvim @@ -151,6 +174,27 @@ func Test_insert_cmd() close! endfunc +func Test_insert_cmd_empty_buf() + CheckRunVimInTerminal + let lines =<< trim END + func Timer(timer) + insert + aaaaa + bbbbb + . + endfunc + call timer_start(10, 'Timer') + END + call writefile(lines, 'Xtest_insert_cmd_empty_buf') + let buf = RunVimInTerminal('-S Xtest_insert_cmd_empty_buf', {'rows': 6}) + call WaitForAssert({-> assert_equal('bbbbb', term_getline(buf, 2))}) + call WaitForAssert({-> assert_equal('aaaaa', term_getline(buf, 1))}) + + " clean up + call StopVimInTerminal(buf) + call delete('Xtest_insert_cmd_empty_buf') +endfunc + " Test for the :change command func Test_change_cmd() set noautoindent " test assumes noautoindent, but it's on by default in Nvim |
