diff options
author | Jerko Steiner <jerko.steiner@gmail.com> | 2019-01-07 17:55:55 +0000 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2019-01-07 17:55:55 +0000 |
commit | 0fcd5e79a9be71027df6d7e77034d530fa9bf959 (patch) | |
tree | 1df17f03c74cc75b8b5b609037e20cce38e04dff /test | |
parent | 5bbe77101db18968fde65210956e54750d7ff4f5 (diff) | |
download | ale-0fcd5e79a9be71027df6d7e77034d530fa9bf959.zip |
Add ability to manually trigger completion menu (#2177)
* Add ability to manually trigger completion menu
* Mention :ALEComplete in completion docs
* Add test for ALEComplete
Diffstat (limited to 'test')
-rw-r--r-- | test/test_ale_complete_command.vader | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/test_ale_complete_command.vader b/test/test_ale_complete_command.vader new file mode 100644 index 00000000..c6ef8bf5 --- /dev/null +++ b/test/test_ale_complete_command.vader @@ -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 |