diff options
author | w0rp <w0rp@users.noreply.github.com> | 2019-07-14 10:29:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-14 10:29:03 +0100 |
commit | 36a50111b91d05afc4ed92a5b5415d0c5527dc6b (patch) | |
tree | 3e79ccf9a7ba8e878685ad10da4af08306cf1d29 /test/python/test_deoplete_source.py | |
parent | abb38955d3acd452e37c15e7bae62022d1153859 (diff) | |
parent | a3521de64e8dfc2e8dbfc562fbc73502ba3e09ce (diff) | |
download | ale-36a50111b91d05afc4ed92a5b5415d0c5527dc6b.zip |
Merge pull request #2601 from delphinus/feature/better-completion-for-deoplete
Show more candidates for Deoplete completion
Diffstat (limited to 'test/python/test_deoplete_source.py')
-rw-r--r-- | test/python/test_deoplete_source.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/test/python/test_deoplete_source.py b/test/python/test_deoplete_source.py index 1462f77d..280df2e3 100644 --- a/test/python/test_deoplete_source.py +++ b/test/python/test_deoplete_source.py @@ -41,6 +41,11 @@ class DeopleteSourceTest(unittest.TestCase): ) self.assertEqual(attributes, { + 'input_patterns': { + '_': r'\.\w*$', + 'rust': r'(\.|::)\w*$', + 'typescript': r'(\.|\'|")\w*$', + }, 'is_bytepos': True, 'mark': '[L]', 'min_pattern_length': 1, @@ -48,12 +53,13 @@ class DeopleteSourceTest(unittest.TestCase): 'rank': 1000, }) - def test_completion_position(self): - self.call_results['ale#completion#GetCompletionPosition'] = 2 + def test_complete_position(self): + self.call_results['ale#completion#GetCompletionPositionForDeoplete'] = 2 + context = {'input': 'foo'} - self.assertEqual(self.source.get_completion_position(), 2) + self.assertEqual(self.source.get_complete_position(context), 2) self.assertEqual(self.call_list, [ - ('ale#completion#GetCompletionPosition', ()), + ('ale#completion#GetCompletionPositionForDeoplete', ('foo',)), ]) def test_request_completion_results(self): |