diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-10-26 13:41:43 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-10-26 13:52:42 +0800 |
commit | 7b39ce36a4599539cd5cb07dad6bd980d30a3180 (patch) | |
tree | 837c0973319b8d168db9ccd96d6ae113d29287e7 /src/nvim/testdir/test_functions.vim | |
parent | d40739843cf9a160587032bf381c440079e5a8ce (diff) | |
download | rneovim-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_functions.vim')
-rw-r--r-- | src/nvim/testdir/test_functions.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 27aab6330f..7049602d98 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -1199,6 +1199,7 @@ func Test_col() norm gg4|mx6|mY2| call assert_equal(2, col('.')) call assert_equal(7, col('$')) + call assert_equal(2, col('v')) call assert_equal(4, col("'x")) call assert_equal(6, col("'Y")) call assert_equal(2, [1, 2]->col()) @@ -1209,6 +1210,19 @@ func Test_col() call assert_equal(0, col([2, '$'])) call assert_equal(0, col([1, 100])) call assert_equal(0, col([1])) + + " test for getting the visual start column + func T() + let g:Vcol = col('v') + return '' + endfunc + let g:Vcol = 0 + xmap <expr> <F2> T() + exe "normal gg3|ve\<F2>" + call assert_equal(3, g:Vcol) + xunmap <F2> + delfunc T + bw! endfunc |