diff options
author | w0rp <devw0rp@gmail.com> | 2018-01-19 16:50:04 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-01-19 16:50:04 +0000 |
commit | a5ec4143d2ed0527649d4143e244b62b9f879661 (patch) | |
tree | ccb5afba9cb07e95e040f01f600b0b74ff59ab24 /test | |
parent | 042dec059a3da01477cbc76e9893973dd374872d (diff) | |
download | ale-a5ec4143d2ed0527649d4143e244b62b9f879661.zip |
Fix the didSave tests so they work in NeoVim 0.1.7, and do not send the message for tsserver
Diffstat (limited to 'test')
-rw-r--r-- | test/lsp/test_did_save_event.vader (renamed from test/lsp/test_lsp_communication.vader) | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/lsp/test_lsp_communication.vader b/test/lsp/test_did_save_event.vader index 7a4c67ea..042a3ce2 100644 --- a/test/lsp/test_lsp_communication.vader +++ b/test/lsp/test_did_save_event.vader @@ -16,13 +16,21 @@ Before: let g:message_list = [] let g:Callback = '' + function! LanguageCallback() abort + return 'foobar' + endfunction + + function! ProjectRootCallback() abort + return expand('.') + endfunction + call ale#linter#Define('foobar', { \ 'name': 'dummy_linter', \ 'lsp': 'stdio', \ 'command': 'cat - > /dev/null', \ 'executable': has('win32') ? 'cmd' : 'echo', - \ 'language_callback': {buffer -> 'foobar'}, - \ 'project_root_callback': {buffer -> expand('.')}, + \ 'language_callback': 'LanguageCallback', + \ 'project_root_callback': 'ProjectRootCallback', \ }) let g:ale_linters = {'foobar': ['dummy_linter']} @@ -48,6 +56,9 @@ After: unlet! g:Callback unlet! g:message_list + delfunction LanguageCallback + delfunction ProjectRootCallback + call ale#test#RestoreDirectory() call ale#linter#Reset() |