1
0
forked from aniani/vim

patch 8.2.0655: search code not sufficiently tested

Problem:    Search code not sufficiently tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes #5999)
This commit is contained in:
Bram Moolenaar
2020-04-28 20:29:07 +02:00
parent a14bb7e113
commit 224a5f17c6
10 changed files with 551 additions and 103 deletions

View File

@@ -154,8 +154,24 @@ func Test_gn_command()
norm! gg0f2vf7gNd
call assert_equal(['1678'], getline(1,'$'))
sil! %d _
set wrapscan&vim
" Without 'wrapscan', in visual mode, running gn without a match should fail
" but the visual mode should be kept.
set nowrapscan
call setline('.', 'one two')
let @/ = 'one'
call assert_beeps('normal 0wvlgn')
exe "normal y"
call assert_equal('tw', @")
" with exclusive selection, run gn and gN
set selection=exclusive
normal 0gny
call assert_equal('one', @")
normal 0wgNy
call assert_equal('one', @")
set selection&
endfu
func Test_gn_multi_line()