]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/completion/test_complete_events.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '294584081929424aec883f90c7d6515b3743358d' as '.vim/bundle/vim-lsp-ale'
[etc/vim.git] / .vim / bundle / ale / test / completion / test_complete_events.vader
1 Before:
2   let g:complete_post_triggered = 0
3
4   augroup VaderTest
5     autocmd!
6     autocmd User ALECompletePost let g:complete_post_triggered = 1
7   augroup END
8
9 After:
10   unlet! b:ale_completion_info
11   unlet! g:complete_post_triggered
12
13   augroup VaderTest
14     autocmd!
15   augroup END
16
17   augroup! VaderTest
18
19 Execute(ALECompletePost should not be triggered when completion is cancelled):
20   call ale#completion#HandleUserData({})
21
22   Assert !g:complete_post_triggered
23
24 Execute(ALECompletePost should not be triggered when tools other than ALE insert completions):
25   call ale#completion#HandleUserData({'user_data': ''})
26   call ale#completion#HandleUserData({'user_data': '{}'})
27
28   Assert !g:complete_post_triggered
29
30 Execute(ALECompletePost should be triggered when ALE inserts completions):
31   call ale#completion#HandleUserData({
32   \ 'user_data': json_encode({'_ale_completion_item': 1}),
33   \})
34
35   Assert g:complete_post_triggered