blob: df53107e0ecf25aa4208898ed80bb8b808c222d8 [file] [log] [blame]
Bram Moolenaardbd24b52015-08-11 14:26:19 +02001Test for character searches
2
3STARTTEST
4:so small.vim
5:" check that "fe" and ";" work
6/^X
7ylfep;;p,,p:
8:" check that save/restore works
9/^Y
10ylfep:let csave = getcharsearch()
11fip:call setcharsearch(csave)
12;p;p:
Bram Moolenaar022b8962016-01-03 22:16:20 +010013:" check that setcharsearch() changes the settings.
Bram Moolenaardbd24b52015-08-11 14:26:19 +020014/^Z
15ylfep:call setcharsearch({'char': 'k'})
16;p:call setcharsearch({'forward': 0})
17$;p:call setcharseearch({'until'}: 1})
18;;p:
19:/^X/,$w! test.out
20:qa!
21ENDTEST
22
23Xabcdefghijkemnopqretuvwxyz
24Yabcdefghijkemnopqretuvwxyz
25Zabcdefghijkemnokqretkvwxyz