diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-03-20 18:20:51 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-03-20 18:20:51 +0100 |
commit | 8b633135106dda8605463b780573c45b00c22afe (patch) | |
tree | 522098c1530def5515e3647660108ced67d7b258 /src/testdir/test_functions.vim | |
parent | 98be7fecac80b30c5a323b67903eb1d0094007ea (diff) | |
download | vim-git-8b633135106dda8605463b780573c45b00c22afe.tar.gz |
patch 8.2.0418: code in eval.c not sufficiently covered by testsv8.2.0418
Problem: Code in eval.c not sufficiently covered by tests.
Solution: Add more tests. (Yegappan Lakshmanan, closes #5815)
Diffstat (limited to 'src/testdir/test_functions.vim')
-rw-r--r-- | src/testdir/test_functions.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim index 696043c7b..f904cc056 100644 --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -1145,6 +1145,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()) @@ -1155,6 +1156,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 |