summaryrefslogtreecommitdiff
path: root/test/lsp
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-04-22 19:49:24 +0100
committerw0rp <devw0rp@gmail.com>2018-04-22 19:49:30 +0100
commit286abd12d3adf3fdb3ed90a71b9dd8e8af4bf841 (patch)
tree07f032fb2e48d6054eb933bc4261d4bcea7950f0 /test/lsp
parent5a365e792693373413984a7eae2d64f7d92c1238 (diff)
downloadale-286abd12d3adf3fdb3ed90a71b9dd8e8af4bf841.zip
Add support for finding references using LSP servers or tsserver
Diffstat (limited to 'test/lsp')
-rw-r--r--test/lsp/test_lsp_client_messages.vader28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/lsp/test_lsp_client_messages.vader b/test/lsp/test_lsp_client_messages.vader
index 053da803..b0f0ed2b 100644
--- a/test/lsp/test_lsp_client_messages.vader
+++ b/test/lsp/test_lsp_client_messages.vader
@@ -144,6 +144,21 @@ Execute(ale#lsp#message#Definition() should return correct messages):
\ ],
\ ale#lsp#message#Definition(bufnr(''), 12, 34)
+Execute(ale#lsp#message#References() should return correct messages):
+ AssertEqual
+ \ [
+ \ 0,
+ \ 'textDocument/references',
+ \ {
+ \ 'textDocument': {
+ \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'),
+ \ },
+ \ 'position': {'line': 11, 'character': 34},
+ \ 'context': {'includeDeclaration': v:false},
+ \ }
+ \ ],
+ \ ale#lsp#message#References(bufnr(''), 12, 34)
+
Execute(ale#lsp#tsserver_message#Open() should return correct messages):
AssertEqual
\ [
@@ -233,3 +248,16 @@ Execute(ale#lsp#tsserver_message#Definition() should return correct messages):
\ }
\ ],
\ ale#lsp#tsserver_message#Definition(bufnr(''), 347, 12)
+
+Execute(ale#lsp#tsserver_message#References() should return correct messages):
+ AssertEqual
+ \ [
+ \ 0,
+ \ 'ts@references',
+ \ {
+ \ 'file': ale#path#Simplify(g:dir . '/foo/bar.ts'),
+ \ 'line': 347,
+ \ 'offset': 12,
+ \ }
+ \ ],
+ \ ale#lsp#tsserver_message#References(bufnr(''), 347, 12)