summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/command_callback/test_julia_languageserver_callbacks.vader8
-rw-r--r--test/completion/test_lsp_completion_parsing.vader24
2 files changed, 30 insertions, 2 deletions
diff --git a/test/command_callback/test_julia_languageserver_callbacks.vader b/test/command_callback/test_julia_languageserver_callbacks.vader
index a1f3a1ae..22c6cefe 100644
--- a/test/command_callback/test_julia_languageserver_callbacks.vader
+++ b/test/command_callback/test_julia_languageserver_callbacks.vader
@@ -1,14 +1,18 @@
Before:
+ Save g:ale_julia_executable
+
call ale#assert#SetUpLinterTest('julia', 'languageserver')
After:
+ Restore
+
call ale#assert#TearDownLinterTest()
Execute(The default executable path should be correct):
AssertLinter 'julia',
\ ale#Escape('julia') .
\' --startup-file=no --history-file=no -e ' .
- \ ale#Escape('using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);')
+ \ ale#Escape('using LanguageServer; server = LanguageServer.LanguageServerInstance(stdin, stdout, false); server.runlinter = true; run(server);')
Execute(The executable should be configurable):
let g:ale_julia_executable = 'julia-new'
@@ -16,7 +20,7 @@ Execute(The executable should be configurable):
AssertLinter 'julia-new',
\ ale#Escape('julia-new') .
\' --startup-file=no --history-file=no -e ' .
- \ ale#Escape('using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);')
+ \ ale#Escape('using LanguageServer; server = LanguageServer.LanguageServerInstance(stdin, stdout, false); server.runlinter = true; run(server);')
Execute(The project root should be detected correctly):
AssertLSPProject ''
diff --git a/test/completion/test_lsp_completion_parsing.vader b/test/completion/test_lsp_completion_parsing.vader
index d5a45b54..71e53ab6 100644
--- a/test/completion/test_lsp_completion_parsing.vader
+++ b/test/completion/test_lsp_completion_parsing.vader
@@ -447,3 +447,27 @@ Execute(Should handle missing keys):
\ ]
\ }
\ })
+
+Execute(Should handle documentation in the markdown format):
+ AssertEqual
+ \ [
+ \ {'word': 'migrations', 'menu': 'xxx', 'info': 'Markdown documentation', 'kind': 'f', 'icase': 1},
+ \ ],
+ \ ale#completion#ParseLSPCompletions({
+ \ 'jsonrpc': '2.0',
+ \ 'id': 6,
+ \ 'result': {
+ \ 'isIncomplete': v:false,
+ \ 'items': [
+ \ {
+ \ 'label': 'migrations',
+ \ 'kind': 3,
+ \ 'detail': 'xxx',
+ \ 'documentation': {
+ \ 'kind': 'markdown',
+ \ 'value': 'Markdown documentation',
+ \ },
+ \ },
+ \ ],
+ \ },
+ \ })