summaryrefslogtreecommitdiff
path: root/test/test_go_to_definition.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2021-03-14 21:10:05 +0000
committerw0rp <devw0rp@gmail.com>2021-03-14 21:10:20 +0000
commitb45ee8ec6c760089c68fb28a5436ec8275ca5381 (patch)
treeb37f356b016f3c09ac7a706ed22fa0d852b32969 /test/test_go_to_definition.vader
parent80a48d01be663205b92902ca3fa137706e3e88c6 (diff)
downloadale-b45ee8ec6c760089c68fb28a5436ec8275ca5381.zip
Close #2102 - Add support for the Angular language server
Diffstat (limited to 'test/test_go_to_definition.vader')
-rw-r--r--test/test_go_to_definition.vader23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/test_go_to_definition.vader b/test/test_go_to_definition.vader
index c7805932..3807bb05 100644
--- a/test/test_go_to_definition.vader
+++ b/test/test_go_to_definition.vader
@@ -343,6 +343,29 @@ Execute(Other files should be jumped to for LSP definition responses):
AssertEqual [3, 8], getpos('.')[1:2]
AssertEqual {}, ale#definition#GetMap()
+Execute(Newer LocationLink items should be supported):
+ call ale#definition#SetMap({3: {'open_in': 'current-buffer'}})
+ call ale#definition#HandleLSPResponse(
+ \ 1,
+ \ {
+ \ 'id': 3,
+ \ 'result': {
+ \ 'targetUri': ale#path#ToURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
+ \ 'targetRange': {
+ \ 'start': {'line': 2, 'character': 7},
+ \ },
+ \ },
+ \ }
+ \)
+
+ AssertEqual
+ \ [
+ \ 'edit +3 ' . fnameescape(ale#path#Simplify(g:dir . '/completion_dummy_file')),
+ \ ],
+ \ g:expr_list
+ AssertEqual [3, 8], getpos('.')[1:2]
+ AssertEqual {}, ale#definition#GetMap()
+
Execute(Locations inside the same file should be jumped to without using :edit):
call ale#definition#SetMap({3: {'open_in': 'current-buffer'}})
call ale#definition#HandleLSPResponse(