This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/test_ale_complete_command.vader
Jerko Steiner 0fcd5e79a9 Add ability to manually trigger completion menu (#2177)
* Add ability to manually trigger completion menu
* Mention :ALEComplete in completion docs
* Add test for ALEComplete
2019-01-07 17:55:55 +00:00

22 lines
614 B
Text

Before:
function! MockAlwaysGetCompletions() abort
let g:get_completions_called = 0
function! ale#completion#AlwaysGetCompletions() abort
let g:get_completions_called = 1
endfunction
endfunction
call MockAlwaysGetCompletions()
After:
unlet! g:get_completions_called
delfunction MockAlwaysGetCompletions
delfunction ale#completion#AlwaysGetCompletions
runtime autoload/ale/completion.vim
Execute(ale#completion#AlwaysGetCompletions should be called when ALEComplete is executed):
AssertEqual 0, g:get_completions_called
ALEComplete
AssertEqual 1, g:get_completions_called