neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

test_charsearch_utf8.vim (781B)


      1 " Tests for related f{char} and t{char} using utf-8.
      2 
      3 " Test for t,f,F,T movement commands
      4 func Test_search_cmds()
      5  new!
      6  call setline(1, "・最初から最後まで最強のVimは最高")
      7  1
      8  normal! f最
      9  call assert_equal([0, 1, 4, 0], getpos('.'))
     10  normal! ;
     11  call assert_equal([0, 1, 16, 0], getpos('.'))
     12  normal! 2;
     13  call assert_equal([0, 1, 43, 0], getpos('.'))
     14  normal! ,
     15  call assert_equal([0, 1, 28, 0], getpos('.'))
     16  call assert_equal('最', getcharsearch().char)
     17  call setcharsearch({'char' : ''})
     18  call assert_equal('', getcharsearch().char)
     19  call assert_beeps('normal ;')
     20  call assert_equal([0, 1, 28, 0], getpos('.'))
     21  call assert_beeps('normal ,')
     22  call assert_equal([0, 1, 28, 0], getpos('.'))
     23  bw!
     24 endfunc
     25 
     26 " vim: shiftwidth=2 sts=2 expandtab