Mercurial > vim
comparison src/testdir/test_gf.vim @ 18552:17ec36265fcb v8.1.2270
patch 8.1.2270: "gf" is not tested in Visual mode
Commit: https://github.com/vim/vim/commit/0208b6b771161d1a668b3568f71dc2bde3614933
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Nov 8 21:49:48 2019 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 08 Nov 2019 22:00:04 +0100 |
parents | 6d9461653dc5 |
children | 25ebc35e104f |
comparison
equal
deleted
inserted
replaced
18551:3f04b0a32e7f | 18552:17ec36265fcb |
---|---|
97 close! | 97 close! |
98 | 98 |
99 call delete('Xtest1') | 99 call delete('Xtest1') |
100 call delete('Xtestgf') | 100 call delete('Xtestgf') |
101 endfunc | 101 endfunc |
102 | |
103 func Test_gf_visual() | |
104 call writefile([], "Xtest_gf_visual") | |
105 new | |
106 call setline(1, 'XXXtest_gf_visualXXX') | |
107 set hidden | |
108 | |
109 " Visually select Xtest_gf_visual and use gf to go to that file | |
110 norm! ttvtXgf | |
111 call assert_equal('Xtest_gf_visual', bufname('%')) | |
112 | |
113 bwipe! | |
114 call delete('Xtest_gf_visual') | |
115 set hidden& | |
116 endfunc | |
117 | |
118 func Test_gf_error() | |
119 new | |
120 call assert_fails('normal gf', 'E446:') | |
121 call assert_fails('normal gF', 'E446:') | |
122 call setline(1, '/doesnotexist') | |
123 call assert_fails('normal gf', 'E447:') | |
124 call assert_fails('normal gF', 'E447:') | |
125 bwipe! | |
126 endfunc |