summaryrefslogtreecommitdiff
path: root/test/lsp
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2018-10-31 16:24:11 +0000
committerGitHub <noreply@github.com>2018-10-31 16:24:11 +0000
commit5f206d900e3ae09cafc36f8038000fb13dbe3bab (patch)
tree97a2f2a8a3a20f7d9c0ea6aaa7c295fdcf1cd9f3 /test/lsp
parent6212c22b5a6312db7e06f802197a7cb021b7e588 (diff)
parent2ac9e2a29e3c570e8aac5d8f5404921e8d816006 (diff)
downloadale-5f206d900e3ae09cafc36f8038000fb13dbe3bab.zip
Merge pull request #2035 from jparise/lsp_config_callback
Add a `lsp_config_callback` linter option
Diffstat (limited to 'test/lsp')
-rw-r--r--test/lsp/test_other_initialize_message_handling.vader1
-rw-r--r--test/lsp/test_update_config.vader17
2 files changed, 18 insertions, 0 deletions
diff --git a/test/lsp/test_other_initialize_message_handling.vader b/test/lsp/test_other_initialize_message_handling.vader
index 072f8c4b..2f59535d 100644
--- a/test/lsp/test_other_initialize_message_handling.vader
+++ b/test/lsp/test_other_initialize_message_handling.vader
@@ -7,6 +7,7 @@ Before:
\ 'initialized': 0,
\ 'init_request_id': 0,
\ 'init_options': {},
+ \ 'config': {},
\ 'callback_list': [],
\ 'message_queue': [],
\ 'capabilities_queue': [],
diff --git a/test/lsp/test_update_config.vader b/test/lsp/test_update_config.vader
new file mode 100644
index 00000000..07068bc8
--- /dev/null
+++ b/test/lsp/test_update_config.vader
@@ -0,0 +1,17 @@
+Before:
+ runtime autoload/ale/lsp.vim
+
+ let g:conn_id = ale#lsp#Register('executable', '/foo/bar', {})
+
+After:
+ Restore
+
+ unlet! g:conn_id
+
+ runtime autoload/ale/lsp.vim
+
+Execute(Only send updates when the configuration dictionary changes):
+ AssertEqual 0, ale#lsp#UpdateConfig(g:conn_id, bufnr(''), {})
+ AssertEqual 1, ale#lsp#UpdateConfig(g:conn_id, bufnr(''), {'a': 1})
+ AssertEqual 0, ale#lsp#UpdateConfig(g:conn_id, bufnr(''), {'a': 1})
+ AssertEqual 1, ale#lsp#UpdateConfig(g:conn_id, bufnr(''), {})