mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-08 20:43:31 +08:00
Add ability to manually trigger completion menu (#2177)
* Add ability to manually trigger completion menu * Mention :ALEComplete in completion docs * Add test for ALEComplete
This commit is contained in:
22
test/test_ale_complete_command.vader
Normal file
22
test/test_ale_complete_command.vader
Normal file
@@ -0,0 +1,22 @@
|
||||
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
|
||||
Reference in New Issue
Block a user