blob: b700a8c756eb8209b64eb7a93c764293abf1d1a4 [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
7function! Test_search_cmds()
8 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!
20endfunction
21
22" vim: shiftwidth=2 sts=2 expandtab
23" Tests for related f{char} and t{char} using utf-8.
24if !has('multi_byte')
25 finish
26endif
27
28" Test for t,f,F,T movement commands
29function! Test_search_cmds()
30 new!
31 call setline(1, "・最初から最後まで最強のVimは最高")
32 1
33 normal! f最
34 call assert_equal([0, 1, 4, 0], getpos('.'))
35 normal! ;
36 call assert_equal([0, 1, 16, 0], getpos('.'))
37 normal! 2;
38 call assert_equal([0, 1, 43, 0], getpos('.'))
39 normal! ,
40 call assert_equal([0, 1, 28, 0], getpos('.'))
41 bw!
42endfunction
43
44" vim: shiftwidth=2 sts=2 expandtab