summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Emmott <fe@fb.com>2018-08-02 09:30:22 -0700
committerFred Emmott <fe@fb.com>2018-08-02 09:30:22 -0700
commit04362c746d7b73b03eb85d8936bd285a841a4704 (patch)
treee9f87790a594713560b0f5c53d06abb02ce96060
parente722841fa38cf5adefa9bc5fbdeb8f0f9a0e637d (diff)
downloadale-04362c746d7b73b03eb85d8936bd285a841a4704.zip
Add test for LSP code of -1
-rw-r--r--test/lsp/test_read_lsp_diagnostics.vader20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/lsp/test_read_lsp_diagnostics.vader b/test/lsp/test_read_lsp_diagnostics.vader
index 134a7161..df187a24 100644
--- a/test/lsp/test_read_lsp_diagnostics.vader
+++ b/test/lsp/test_read_lsp_diagnostics.vader
@@ -89,6 +89,26 @@ Execute(ale#lsp#response#ReadDiagnostics() should handle messages without codes)
\ },
\ ]}})
+Execute(ale#lsp#response#ReadDiagnostics() should consider -1 to be a meaningless code):
+ AssertEqual [
+ \ {
+ \ 'type': 'E',
+ \ 'text': 'Something went wrong!',
+ \ 'lnum': 3,
+ \ 'col': 11,
+ \ 'end_lnum': 5,
+ \ 'end_col': 16,
+ \ }
+ \ ],
+ \ ale#lsp#response#ReadDiagnostics({'params': {'uri': 'filename.ts', 'diagnostics': [
+ \ {
+ \ 'range': Range(2, 10, 4, 15),
+ \ 'message': 'Something went wrong!',
+ \ 'code': -1,
+ \ },
+ \ ]}})
+
+
Execute(ale#lsp#response#ReadDiagnostics() should handle multiple messages):
AssertEqual [
\ {