2018-02-11 12:05:57 -07:00
|
|
|
" Tests for related f{char} and t{char} using utf-8.
|
|
|
|
|
|
|
|
" Test for t,f,F,T movement commands
|
2022-02-06 14:34:20 -07:00
|
|
|
func Test_search_cmds()
|
2018-02-11 12:05:57 -07:00
|
|
|
new!
|
|
|
|
call setline(1, "・最初から最後まで最強のVimは最高")
|
|
|
|
1
|
|
|
|
normal! f最
|
|
|
|
call assert_equal([0, 1, 4, 0], getpos('.'))
|
|
|
|
normal! ;
|
|
|
|
call assert_equal([0, 1, 16, 0], getpos('.'))
|
|
|
|
normal! 2;
|
|
|
|
call assert_equal([0, 1, 43, 0], getpos('.'))
|
|
|
|
normal! ,
|
|
|
|
call assert_equal([0, 1, 28, 0], getpos('.'))
|
2023-05-14 17:04:23 -07:00
|
|
|
call assert_equal('最', getcharsearch().char)
|
|
|
|
call setcharsearch({'char' : ''})
|
|
|
|
call assert_equal('', getcharsearch().char)
|
|
|
|
call assert_beeps('normal ;')
|
|
|
|
call assert_equal([0, 1, 28, 0], getpos('.'))
|
|
|
|
call assert_beeps('normal ,')
|
|
|
|
call assert_equal([0, 1, 28, 0], getpos('.'))
|
2018-02-11 12:05:57 -07:00
|
|
|
bw!
|
2020-11-29 23:08:27 -07:00
|
|
|
endfunc
|
2018-02-11 12:05:57 -07:00
|
|
|
|
|
|
|
" vim: shiftwidth=2 sts=2 expandtab
|