1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 02:10:05 +08:00
SpaceVim/bundle/incsearch.vim/test/question_pattern.vimspec
Wang Shidong cd6ea298f2
fix java neoformat config
* Add incsearch.vim into bundle dir

* Fix java neoformat config

close #3573

* Use echom instead in pull.vim
2020-06-13 21:58:05 +08:00

51 lines
1.0 KiB
Plaintext
Vendored

Describe question_pattern
function! s:add_line(str)
put! =a:str
endfunction
function! s:add_lines(lines)
for line in reverse(deepcopy(a:lines))
put! =line
endfor
endfunction
function! s:get_pos_char()
return getline('.')[col('.')-1]
endfunction
function! s:reset_buffer()
:1,$ delete
let s:lines = ['1pattern_?', '2pattern_??', '3?pattern_c']
call s:add_lines(s:lines)
normal! Gddgg0zt
endfunction
Before all
let PowerAssert = powerassert#import()
execute PowerAssert.define('PowerAssert')
let s:assert = PowerAssert.assert
map / <Plug>(incsearch-forward)
map ? <Plug>(incsearch-backward)
map g/ <Plug>(incsearch-stay)
call s:reset_buffer()
End
Before each
:1
normal! zt
End
Describe search register @/
It @/ should be ? with `?\?`
:$
exec "normal" "?\\?\<CR>"
PowerAssert @/ is# '?'
End
It @/ should be \/ with `/\/`
exec "normal" "/\\/\<CR>"
PowerAssert @/ is# '\/'
End
End
End