summaryrefslogtreecommitdiff
path: root/test/test_ale_complete_command.vader
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2019-01-08 14:27:04 +0000
committerGitHub <noreply@github.com>2019-01-08 14:27:04 +0000
commit84475ff6f16d2f10cba7d93de2911eb37b753795 (patch)
treefbf1c1b1d04501f62384fcaa713351c4aacc93f3 /test/test_ale_complete_command.vader
parent1d7acad891daad502b6c8314c137b456f3df47ff (diff)
parentb1b05e6e66f84e93ebf521444e3d21500a87bcdf (diff)
downloadale-84475ff6f16d2f10cba7d93de2911eb37b753795.zip
Merge pull request #2189 from jeremija/jeremija/manual-autocomplete-wo-prefix
Manually trigger autocomplete even when prefix is ""
Diffstat (limited to 'test/test_ale_complete_command.vader')
-rw-r--r--test/test_ale_complete_command.vader6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test_ale_complete_command.vader b/test/test_ale_complete_command.vader
index c6ef8bf5..11f781c2 100644
--- a/test/test_ale_complete_command.vader
+++ b/test/test_ale_complete_command.vader
@@ -1,9 +1,11 @@
Before:
function! MockAlwaysGetCompletions() abort
let g:get_completions_called = 0
+ let g:always_get_completions_argument = -1
- function! ale#completion#AlwaysGetCompletions() abort
+ function! ale#completion#AlwaysGetCompletions(need_prefix) abort
let g:get_completions_called = 1
+ let g:always_get_completions_argument = a:need_prefix
endfunction
endfunction
@@ -11,6 +13,7 @@ Before:
After:
unlet! g:get_completions_called
+ unlet! g:always_get_completions_argument
delfunction MockAlwaysGetCompletions
delfunction ale#completion#AlwaysGetCompletions
@@ -20,3 +23,4 @@ Execute(ale#completion#AlwaysGetCompletions should be called when ALEComplete is
AssertEqual 0, g:get_completions_called
ALEComplete
AssertEqual 1, g:get_completions_called
+ AssertEqual 0, g:always_get_completions_argument