patch 8.2.1061: insufficient testing for src/window.c
Problem: Insufficient testing for src/window.c.
Solution: Add more tests. (Yegappan Lakshmanan, closes #6345)
diff --git a/src/testdir/test_gf.vim b/src/testdir/test_gf.vim
index 3fa8511..eaa8c0f 100644
--- a/src/testdir/test_gf.vim
+++ b/src/testdir/test_gf.vim
@@ -74,11 +74,18 @@
call assert_equal('Xfile', bufname('%'))
call assert_equal(2, getcurpos()[1])
+ " jumping to the file/line with CTRL-W_F
+ %bw!
+ edit Xfile1
+ call setline(1, ['one', 'Xfile:4', 'three'])
+ exe "normal 2G\<C-W>F"
+ call assert_equal('Xfile', bufname('%'))
+ call assert_equal(4, getcurpos()[1])
+
set isfname&
call delete('Xfile')
call delete('Xfile2')
- bwipe Xfile
- bwipe Xfile2
+ %bw!
endfunc
" Test for invoking 'gf' on a ${VAR} variable