comparison src/testdir/test_charsearch.vim @ 20848:d3fa0d29fa9a v8.2.0976

patch 8.2.0976: some 'cpoptions' not tested Commit: https://github.com/vim/vim/commit/df7df59d85e7e56a796912dc865488a75d3f0e53 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 14 13:50:55 2020 +0200 patch 8.2.0976: some 'cpoptions' not tested Problem: Some 'cpoptions' not tested. Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/6253)
author Bram Moolenaar <Bram@vim.org>
date Sun, 14 Jun 2020 14:00:03 +0200
parents a4bd28e2cf1d
children 1baf86830e44
comparison
equal deleted inserted replaced
20847:4e1017c5fbb5 20848:d3fa0d29fa9a
41 41
42 call assert_fails("call setcharsearch([])", 'E715:') 42 call assert_fails("call setcharsearch([])", 'E715:')
43 enew! 43 enew!
44 endfunc 44 endfunc
45 45
46 " Test for t,f,F,T movement commands and 'cpo-;' setting
47 func Test_search_cmds()
48 enew!
49 call append(0, ["aaa two three four", " zzz", "yyy ",
50 \ "bbb yee yoo four", "ccc two three four",
51 \ "ddd yee yoo four"])
52 set cpo-=;
53 1
54 normal! 0tt;D
55 2
56 normal! 0fz;D
57 3
58 normal! $Fy;D
59 4
60 normal! $Ty;D
61 set cpo+=;
62 5
63 normal! 0tt;;D
64 6
65 normal! $Ty;;D
66
67 call assert_equal('aaa two', getline(1))
68 call assert_equal(' z', getline(2))
69 call assert_equal('y', getline(3))
70 call assert_equal('bbb y', getline(4))
71 call assert_equal('ccc', getline(5))
72 call assert_equal('ddd yee y', getline(6))
73 enew!
74 endfunc
75
76 " Test for character search in virtual edit mode with <Tab> 46 " Test for character search in virtual edit mode with <Tab>
77 func Test_csearch_virtualedit() 47 func Test_csearch_virtualedit()
78 new 48 new
79 set virtualedit=all 49 set virtualedit=all
80 call setline(1, "a\tb") 50 call setline(1, "a\tb")