blob: 399ac51c4854d1e9bbcfd17487716f31b46d43e5 [file] [log] [blame]
Bram Moolenaar454709b2017-03-12 16:37:14 +01001" Tests for related f{char} and t{char} using utf-8.
2if !has('multi_byte')
3 finish
4endif
5
6" Test for t,f,F,T movement commands
Bram Moolenaar1e115362019-01-09 23:01:02 +01007func Test_search_cmds()
Bram Moolenaar454709b2017-03-12 16:37:14 +01008 new!
9 call setline(1, "・最初から最後まで最強のVimは最高")
10 1
11 normal! f
12 call assert_equal([0, 1, 4, 0], getpos('.'))
13 normal! ;
14 call assert_equal([0, 1, 16, 0], getpos('.'))
15 normal! 2;
16 call assert_equal([0, 1, 43, 0], getpos('.'))
17 normal! ,
18 call assert_equal([0, 1, 28, 0], getpos('.'))
19 bw!
Bram Moolenaar1e115362019-01-09 23:01:02 +010020endfunc
Bram Moolenaar454709b2017-03-12 16:37:14 +010021
22" vim: shiftwidth=2 sts=2 expandtab