aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_marks.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-26 13:41:43 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-10-26 13:52:42 +0800
commit7b39ce36a4599539cd5cb07dad6bd980d30a3180 (patch)
tree837c0973319b8d168db9ccd96d6ae113d29287e7 /src/nvim/testdir/test_marks.vim
parentd40739843cf9a160587032bf381c440079e5a8ce (diff)
downloadrneovim-7b39ce36a4599539cd5cb07dad6bd980d30a3180.tar.gz
rneovim-7b39ce36a4599539cd5cb07dad6bd980d30a3180.tar.bz2
rneovim-7b39ce36a4599539cd5cb07dad6bd980d30a3180.zip
vim-patch:8.2.0418: code in eval.c not sufficiently covered by tests
Problem: Code in eval.c not sufficiently covered by tests. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5815) https://github.com/vim/vim/commit/8b633135106dda8605463b780573c45b00c22afe Nvim does not have v:none, so comment out test for it.
Diffstat (limited to 'src/nvim/testdir/test_marks.vim')
-rw-r--r--src/nvim/testdir/test_marks.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_marks.vim b/src/nvim/testdir/test_marks.vim
index 74e63d9d69..054ebf1218 100644
--- a/src/nvim/testdir/test_marks.vim
+++ b/src/nvim/testdir/test_marks.vim
@@ -91,6 +91,15 @@ func Test_setpos()
call assert_equal([0, 1, 21341234, 0], getpos("'a"))
call assert_equal(4, virtcol("'a"))
+ " Test with invalid buffer number, line number and column number
+ call cursor(2, 2)
+ call setpos('.', [-1, 1, 1, 0])
+ call assert_equal([2, 2], [line('.'), col('.')])
+ call setpos('.', [0, -1, 1, 0])
+ call assert_equal([2, 2], [line('.'), col('.')])
+ call setpos('.', [0, 1, -1, 0])
+ call assert_equal([2, 2], [line('.'), col('.')])
+
bwipe!
call win_gotoid(twowin)
bwipe!