diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-11-08 21:59:31 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-11-09 09:58:32 -0500 |
commit | 2a59ae0f1da613629c08ab16e062cb6fda6ee778 (patch) | |
tree | 83d720f4f7cdaa954e6c12239e3a33f356f86d5d /src | |
parent | 805a577f71f385c783e5ae7604aac41f650c2de6 (diff) | |
download | rneovim-2a59ae0f1da613629c08ab16e062cb6fda6ee778.tar.gz rneovim-2a59ae0f1da613629c08ab16e062cb6fda6ee778.tar.bz2 rneovim-2a59ae0f1da613629c08ab16e062cb6fda6ee778.zip |
vim-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 vim/vim#5197)
https://github.com/vim/vim/commit/0208b6b771161d1a668b3568f71dc2bde3614933
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_gf.vim | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_gf.vim b/src/nvim/testdir/test_gf.vim index accd21e9a3..d301874891 100644 --- a/src/nvim/testdir/test_gf.vim +++ b/src/nvim/testdir/test_gf.vim @@ -99,3 +99,28 @@ func Test_gf() call delete('Xtest1') call delete('Xtestgf') 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 |