e149692cc9
subrepo: subdir: "dotfiles/.vim/plugged/ale" merged: "e4b205440" upstream: origin: "https://github.com/dense-analysis/ale.git" branch: "master" commit: "e4b205440" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
35 lines
924 B
Text
35 lines
924 B
Text
Before:
|
|
let g:complete_post_triggered = 0
|
|
|
|
augroup VaderTest
|
|
autocmd!
|
|
autocmd User ALECompletePost let g:complete_post_triggered = 1
|
|
augroup END
|
|
|
|
After:
|
|
unlet! b:ale_completion_info
|
|
unlet! g:complete_post_triggered
|
|
|
|
augroup VaderTest
|
|
autocmd!
|
|
augroup END
|
|
|
|
augroup! VaderTest
|
|
|
|
Execute(ALECompletePost should not be triggered when completion is cancelled):
|
|
call ale#completion#HandleUserData({})
|
|
|
|
Assert !g:complete_post_triggered
|
|
|
|
Execute(ALECompletePost should not be triggered when tools other than ALE insert completions):
|
|
call ale#completion#HandleUserData({'user_data': ''})
|
|
call ale#completion#HandleUserData({'user_data': '{}'})
|
|
|
|
Assert !g:complete_post_triggered
|
|
|
|
Execute(ALECompletePost should be triggered when ALE inserts completions):
|
|
call ale#completion#HandleUserData({
|
|
\ 'user_data': json_encode({'_ale_completion_item': 1}),
|
|
\})
|
|
|
|
Assert g:complete_post_triggered
|