1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 13:00:05 +08:00
SpaceVim/bundle/vim-lookup/test/tests/command.vader
2022-03-22 14:33:27 +08:00

23 lines
535 B
Plaintext
Vendored

Given vim:
command! -nargs=+ TestIt call s:func(<f-args>)
execute "command! -nargs=0 TestFlip let s:var = 'hello'"
execute 'let s:var = "bar"'
echomsg s:var
function! s:nested(a, b)
TestIt
TestFlip
endfunc
Execute (:call lookup#lookup() to find definition of commands):
" on TestIt
normal! 6G
AssertEqual [6, 3], [line('.'), col('.')]
call lookup#lookup()
AssertEqual [1, 22], [line('.'), col('.')]
" on TestFlip
normal! 7G
call lookup#lookup()
AssertEqual [2, 31], [line('.'), col('.')]