diff options
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_ins_complete.vim | 2 | ||||
| -rw-r--r-- | src/nvim/testdir/test_messages.vim | 56 | ||||
| -rw-r--r-- | src/nvim/testdir/test_window_cmd.vim | 4 |
3 files changed, 58 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_ins_complete.vim b/src/nvim/testdir/test_ins_complete.vim index 362c58aa31..179218e48a 100644 --- a/src/nvim/testdir/test_ins_complete.vim +++ b/src/nvim/testdir/test_ins_complete.vim @@ -346,7 +346,7 @@ func Test_CompleteDone_modify() \ 'user_data': '', \ } let v:completed_item = value - call assert_equal(v:completed_item, value) + call assert_equal(value, v:completed_item) endfunc func CompleteTest(findstart, query) diff --git a/src/nvim/testdir/test_messages.vim b/src/nvim/testdir/test_messages.vim index 2f9c562771..a02d23b409 100644 --- a/src/nvim/testdir/test_messages.vim +++ b/src/nvim/testdir/test_messages.vim @@ -316,4 +316,60 @@ func Test_fileinfo_after_echo() call delete('b.txt') endfunc +func Test_cmdheight_zero() + set cmdheight=0 + set showcmd + redraw! + + echo 'test echo' + call assert_equal(116, screenchar(&lines, 1)) + redraw! + + echomsg 'test echomsg' + call assert_equal(116, screenchar(&lines, 1)) + redraw! + + call feedkeys(":ls\<CR>", "xt") + call assert_equal(':ls', Screenline(&lines - 1)) + redraw! + + let char = getchar(0) + call assert_match(char, 0) + + " Check change/restore cmdheight when macro + call feedkeys("qa", "xt") + call assert_equal(1, &cmdheight) + call feedkeys("q", "xt") + call assert_equal(0, &cmdheight) + + call setline(1, 'somestring') + call feedkeys("y", "n") + %s/somestring/otherstring/gc + call assert_equal('otherstring', getline(1)) + + call feedkeys("g\<C-g>", "xt") + call assert_match( + \ 'Col 1 of 11; Line 1 of 1; Word 1 of 1', + \ Screenline(&lines)) + + " Check split behavior + for i in range(1, 10) + split + endfor + only + call assert_equal(0, &cmdheight) + + " Check that pressing ":" should not scroll a window + " Check for what patch 9.0.0115 fixes + botright 10new + call setline(1, range(12)) + 7 + call feedkeys(":\"\<C-R>=line('w0')\<CR>\<CR>", "xt") + call assert_equal('"1', @:) + bwipe! + + set cmdheight& + set showcmd& +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/testdir/test_window_cmd.vim b/src/nvim/testdir/test_window_cmd.vim index 3bfff0a577..d96fc2d789 100644 --- a/src/nvim/testdir/test_window_cmd.vim +++ b/src/nvim/testdir/test_window_cmd.vim @@ -1390,11 +1390,9 @@ func Test_win_move_statusline() call assert_equal(h0, winheight(0)) call assert_equal(1, &cmdheight) endfor - " Nvim supports cmdheight=0 + " supports cmdheight=0 set cmdheight=0 call assert_true(win_move_statusline(0, 1)) - "call assert_equal(h0, winheight(0)) - "call assert_equal(1, &cmdheight) call assert_equal(h0 + 1, winheight(0)) call assert_equal(0, &cmdheight) set cmdheight& |