view src/testdir/test_charsearch.in @ 10054:d4b7232fc63a v7.4.2298

commit https://github.com/vim/vim/commit/0874a83e9be1b39fdb217f02b427bf1d6133a4d8 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 1 15:11:51 2016 +0200 patch 7.4.2298 Problem: It is not possible to close the "in" part of a channel. Solution: Add ch_close_in().
author Christian Brabandt <cb@256bit.org>
date Thu, 01 Sep 2016 15:15:08 +0200
parents efbb9916290c
children
line wrap: on
line source

Test for character searches

STARTTEST
:so small.vim
:" check that "fe" and ";" work
/^X
ylfep;;p,,p:
:" check that save/restore works
/^Y
ylfep:let csave = getcharsearch()
fip:call setcharsearch(csave)
;p;p:
:" check that setcharsearch() changes the settings.
/^Z
ylfep:call setcharsearch({'char': 'k'})
;p:call setcharsearch({'forward': 0})
$;p:call setcharsearch({'until': 1})
:set cpo-=;
;;p:
:/^X/,$w! test.out
:qa!
ENDTEST

Xabcdefghijkemnopqretuvwxyz
Yabcdefghijkemnopqretuvwxyz
Zabcdefghijkemnokqretkvwxyz