0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.2270: "gf" is not tested in Visual mode

Problem:    "gf" is not tested in Visual mode.
Solution:   Add Visual mode test and test errors. (Dominique Pelle,
            closes #5197)
This commit is contained in:
Bram Moolenaar
2019-11-08 21:49:48 +01:00
parent dc9ef26845
commit 0208b6b771
2 changed files with 27 additions and 0 deletions

View File

@@ -99,3 +99,28 @@ func Test_gf()
call delete('Xtest1') call delete('Xtest1')
call delete('Xtestgf') call delete('Xtestgf')
endfunc endfunc
func Test_gf_visual()
call writefile([], "Xtest_gf_visual")
new
call setline(1, 'XXXtest_gf_visualXXX')
set hidden
" Visually select Xtest_gf_visual and use gf to go to that file
norm! ttvtXgf
call assert_equal('Xtest_gf_visual', bufname('%'))
bwipe!
call delete('Xtest_gf_visual')
set hidden&
endfunc
func Test_gf_error()
new
call assert_fails('normal gf', 'E446:')
call assert_fails('normal gF', 'E446:')
call setline(1, '/doesnotexist')
call assert_fails('normal gf', 'E447:')
call assert_fails('normal gF', 'E447:')
bwipe!
endfunc

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2270,
/**/ /**/
2269, 2269,
/**/ /**/