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

@@ -882,7 +882,7 @@ func Test_tw_2_fo_tm_replace()
endfunc
" Test for 'matchpairs' with multibyte chars
func Test_mps()
func Test_mps_multibyte()
new
let t =<< trim END
{
@@ -906,6 +906,30 @@ func Test_mps()
bwipe!
endfunc
" Test for 'matchpairs' in latin1 encoding
func Test_mps_latin1()
new
let save_enc = &encoding
set encoding=latin1
call setline(1, 'abc(def)ghi')
normal %
call assert_equal(8, col('.'))
normal %
call assert_equal(4, col('.'))
call cursor(1, 6)
normal [(
call assert_equal(4, col('.'))
normal %
call assert_equal(8, col('.'))
call cursor(1, 6)
normal ])
call assert_equal(8, col('.'))
normal %
call assert_equal(4, col('.'))
let &encoding = save_enc
close!
endfunc
" Test for ra on multi-byte characters
func Test_ra_multibyte()
new