summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/completion/test_ale_import_command.vader4
-rw-r--r--test/completion/test_lsp_completion_messages.vader8
-rw-r--r--test/lsp/test_closing_documents.vader20
-rw-r--r--test/lsp/test_did_save_event.vader8
-rw-r--r--test/lsp/test_engine_lsp_response_handling.vader4
-rw-r--r--test/lsp/test_lsp_client_messages.vader22
-rw-r--r--test/lsp/test_lsp_startup.vader4
-rw-r--r--test/test_codefix.vader4
-rw-r--r--test/test_find_references.vader12
-rw-r--r--test/test_go_to_definition.vader28
-rw-r--r--test/test_ignoring_linters.vader4
-rw-r--r--test/test_path_uri.vader100
-rw-r--r--test/test_rename.vader4
-rw-r--r--test/test_symbol_search.vader4
14 files changed, 113 insertions, 113 deletions
diff --git a/test/completion/test_ale_import_command.vader b/test/completion/test_ale_import_command.vader
index d36caae2..1ce3a2a2 100644
--- a/test/completion/test_ale_import_command.vader
+++ b/test/completion/test_ale_import_command.vader
@@ -368,7 +368,7 @@ Execute(ALEImport should request imports correctly for language servers):
AssertEqual
\ [
\ [0, 'textDocument/completion', {
- \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))},
+ \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))},
\ 'position': {'character': 6, 'line': 1}
\ }],
\ ],
@@ -514,7 +514,7 @@ Execute(ALEImport should tell the user when no completions were found from a lan
AssertEqual
\ [
\ [0, 'textDocument/completion', {
- \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))},
+ \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))},
\ 'position': {'character': 6, 'line': 1}
\ }],
\ ],
diff --git a/test/completion/test_lsp_completion_messages.vader b/test/completion/test_lsp_completion_messages.vader
index 87847777..f6aa332b 100644
--- a/test/completion/test_lsp_completion_messages.vader
+++ b/test/completion/test_lsp_completion_messages.vader
@@ -233,13 +233,13 @@ Execute(The right message should be sent for the initial LSP request):
\ [
\ [1, 'textDocument/didChange', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'version': g:ale_lsp_next_version_id - 1,
\ },
\ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}]
\ }],
\ [0, 'textDocument/completion', {
- \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))},
+ \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))},
\ 'position': {'line': 0, 'character': 2},
\ }],
\ ],
@@ -294,13 +294,13 @@ Execute(Two completion requests shouldn't be sent in a row):
\ [
\ [1, 'textDocument/didChange', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'version': g:ale_lsp_next_version_id - 1,
\ },
\ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}]
\ }],
\ [0, 'textDocument/completion', {
- \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))},
+ \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))},
\ 'position': {'line': 0, 'character': 2},
\ }],
\ ],
diff --git a/test/lsp/test_closing_documents.vader b/test/lsp/test_closing_documents.vader
index e6e11415..b9f2f824 100644
--- a/test/lsp/test_closing_documents.vader
+++ b/test/lsp/test_closing_documents.vader
@@ -63,7 +63,7 @@ Execute(A message should be sent if the document was opened):
\ [
\ ['command:/foo', 1, 'textDocument/didOpen', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'version': g:ale_lsp_next_version_id - 1,
\ 'languageId': 'lang',
\ 'text': "\n",
@@ -71,7 +71,7 @@ Execute(A message should be sent if the document was opened):
\ }],
\ ['command:/foo', 1, 'textDocument/didClose', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ },
\ }],
\ ],
@@ -106,7 +106,7 @@ Execute(Re-opening and closing the documents should work):
\ [
\ ['command:/foo', 1, 'textDocument/didOpen', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'version': g:ale_lsp_next_version_id - 2,
\ 'languageId': 'lang',
\ 'text': "\n",
@@ -114,12 +114,12 @@ Execute(Re-opening and closing the documents should work):
\ }],
\ ['command:/foo', 1, 'textDocument/didClose', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ },
\ }],
\ ['command:/foo', 1, 'textDocument/didOpen', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'version': g:ale_lsp_next_version_id - 1,
\ 'languageId': 'lang',
\ 'text': "\n",
@@ -127,7 +127,7 @@ Execute(Re-opening and closing the documents should work):
\ }],
\ ['command:/foo', 1, 'textDocument/didClose', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ },
\ }],
\ ],
@@ -148,7 +148,7 @@ Execute(Messages for closing documents should be sent to each server):
\ [
\ ['command:/foo', 1, 'textDocument/didOpen', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'version': g:ale_lsp_next_version_id - 2,
\ 'languageId': 'lang',
\ 'text': "\n",
@@ -156,7 +156,7 @@ Execute(Messages for closing documents should be sent to each server):
\ }],
\ ['command:/bar', 1, 'textDocument/didOpen', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'version': g:ale_lsp_next_version_id - 1,
\ 'languageId': 'lang',
\ 'text': "\n",
@@ -164,12 +164,12 @@ Execute(Messages for closing documents should be sent to each server):
\ }],
\ ['command:/bar', 1, 'textDocument/didClose', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ },
\ }],
\ ['command:/foo', 1, 'textDocument/didClose', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ },
\ }],
\ ],
diff --git a/test/lsp/test_did_save_event.vader b/test/lsp/test_did_save_event.vader
index fbec10e5..fc73c4d6 100644
--- a/test/lsp/test_did_save_event.vader
+++ b/test/lsp/test_did_save_event.vader
@@ -94,7 +94,7 @@ Execute(Server should be notified on save):
\ [
\ [1, 'textDocument/didChange', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'version': g:ale_lsp_next_version_id - 1,
\ },
\ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}],
@@ -118,14 +118,14 @@ Execute(Server should be notified on save with didSave is supported by server):
\ [
\ [1, 'textDocument/didChange', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'version': g:ale_lsp_next_version_id - 1,
\ },
\ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}],
\ }],
\ [1, 'textDocument/didSave', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ },
\ }],
\ ],
@@ -138,7 +138,7 @@ Execute(Server should be notified on change):
\ [
\ [1, 'textDocument/didChange', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'version': g:ale_lsp_next_version_id - 1,
\ },
\ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}],
diff --git a/test/lsp/test_engine_lsp_response_handling.vader b/test/lsp/test_engine_lsp_response_handling.vader
index 1c5082c5..6f46699a 100644
--- a/test/lsp/test_engine_lsp_response_handling.vader
+++ b/test/lsp/test_engine_lsp_response_handling.vader
@@ -314,7 +314,7 @@ Execute(LSP diagnostics responses should be handled correctly):
\ 'jsonrpc':'2.0',
\ 'method':'textDocument/publishDiagnostics',
\ 'params': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'diagnostics': [
\ {
\ 'range': {
@@ -403,7 +403,7 @@ Execute(LSP errors should mark linters no longer active):
call ale#lsp_linter#HandleLSPResponse(1, {
\ 'method': 'textDocument/publishDiagnostics',
\ 'params': {
- \ 'uri': ale#path#ToURI(g:dir . '/filename.py'),
+ \ 'uri': ale#path#ToFileURI(g:dir . '/filename.py'),
\ 'diagnostics': [],
\ },
\})
diff --git a/test/lsp/test_lsp_client_messages.vader b/test/lsp/test_lsp_client_messages.vader
index 4c6b0ffa..65fdaa67 100644
--- a/test/lsp/test_lsp_client_messages.vader
+++ b/test/lsp/test_lsp_client_messages.vader
@@ -44,7 +44,7 @@ Execute(ale#lsp#message#DidOpen() should return correct messages):
\ 'textDocument/didOpen',
\ {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'),
+ \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'),
\ 'languageId': 'typescript',
\ 'version': 12,
\ 'text': "foo()\nbar()\nbaz()\n",
@@ -62,7 +62,7 @@ Execute(ale#lsp#message#DidChange() should return correct messages):
\ 'textDocument/didChange',
\ {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'),
+ \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'),
\ 'version': 34,
\ },
\ 'contentChanges': [{'text': "foo()\nbar()\nbaz()\n"}],
@@ -84,7 +84,7 @@ Execute(ale#lsp#message#DidSave() should return correct messages):
\ 'textDocument/didSave',
\ {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'),
+ \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'),
\ },
\ }
\ ],
@@ -97,7 +97,7 @@ Execute(ale#lsp#message#DidSave() should return correct message with includeText
\ 'textDocument/didSave',
\ {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'),
+ \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'),
\ 'version': 1,
\ },
\ 'text': ale#util#GetBufferContents(bufnr('')),
@@ -112,7 +112,7 @@ Execute(ale#lsp#message#DidClose() should return correct messages):
\ 'textDocument/didClose',
\ {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'),
+ \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'),
\ },
\ }
\ ],
@@ -125,7 +125,7 @@ Execute(ale#lsp#message#Completion() should return correct messages):
\ 'textDocument/completion',
\ {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'),
+ \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'),
\ },
\ 'position': {'line': 11, 'character': 33},
\ }
@@ -139,7 +139,7 @@ Execute(ale#lsp#message#Completion() should return correct messages with a trigg
\ 'textDocument/completion',
\ {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'),
+ \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'),
\ },
\ 'position': {'line': 11, 'character': 33},
\ 'context': {'triggerKind': 2, 'triggerCharacter': '.'},
@@ -154,7 +154,7 @@ Execute(ale#lsp#message#Definition() should return correct messages):
\ 'textDocument/definition',
\ {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'),
+ \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'),
\ },
\ 'position': {'line': 11, 'character': 33},
\ }
@@ -168,7 +168,7 @@ Execute(ale#lsp#message#TypeDefinition() should return correct messages):
\ 'textDocument/typeDefinition',
\ {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'),
+ \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'),
\ },
\ 'position': {'line': 11, 'character': 33},
\ }
@@ -182,7 +182,7 @@ Execute(ale#lsp#message#References() should return correct messages):
\ 'textDocument/references',
\ {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'),
+ \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'),
\ },
\ 'position': {'line': 11, 'character': 33},
\ 'context': {'includeDeclaration': v:false},
@@ -208,7 +208,7 @@ Execute(ale#lsp#message#Hover() should return correct messages):
\ 'textDocument/hover',
\ {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'),
+ \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'),
\ },
\ 'position': {'line': 11, 'character': 33},
\ }
diff --git a/test/lsp/test_lsp_startup.vader b/test/lsp/test_lsp_startup.vader
index f0afe39c..21c61e13 100644
--- a/test/lsp/test_lsp_startup.vader
+++ b/test/lsp/test_lsp_startup.vader
@@ -138,7 +138,7 @@ Before:
\ 'id': 1,
\ 'params': {
\ 'initializationOptions': {},
- \ 'rootUri': ale#path#ToURI(a:root),
+ \ 'rootUri': ale#path#ToFileURI(a:root),
\ 'rootPath': a:root,
\ 'processId': getpid(),
\ 'capabilities': {
@@ -253,7 +253,7 @@ Before:
\ 'jsonrpc': '2.0',
\ 'params': {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
+ \ 'uri': ale#path#ToFileURI(expand('#' . a:buffer . ':p')),
\ 'version': ale#lsp#message#GetNextVersionID() - 1,
\ 'languageId': a:language,
\ 'text': "\n",
diff --git a/test/test_codefix.vader b/test/test_codefix.vader
index 88a3676c..2d6d215b 100644
--- a/test/test_codefix.vader
+++ b/test/test_codefix.vader
@@ -511,7 +511,7 @@ Execute(LSP code action requests should be sent):
\ 'diagnostics': [{'range': {'end': {'character': 6, 'line': 1}, 'start': {'character': 4, 'line': 1}}, 'code': 2304, 'message': 'oops'}]
\ },
\ 'range': {'end': {'character': 5, 'line': 1}, 'start': {'character': 4, 'line': 1}},
- \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))}
+ \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}
\ }]
\ ],
\ g:message_list[-1:]
@@ -543,7 +543,7 @@ Execute(LSP code action requests should be sent only for error with code):
\ 'diagnostics': [{'range': {'end': {'character': 6, 'line': 1}, 'start': {'character': 4, 'line': 1}}, 'code': 2304, 'message': 'oops'}]
\ },
\ 'range': {'end': {'character': 5, 'line': 1}, 'start': {'character': 4, 'line': 1}},
- \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))}
+ \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}
\ }]
\ ],
\ g:message_list[-1:]
diff --git a/test/test_find_references.vader b/test/test_find_references.vader
index f8f7a7d7..01c15469 100644
--- a/test/test_find_references.vader
+++ b/test/test_find_references.vader
@@ -357,13 +357,13 @@ Execute(LSP reference responses should be handled):
\ 'id': 3,
\ 'result': [
\ {
- \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
+ \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
\ 'range': {
\ 'start': {'line': 2, 'character': 7},
\ },
\ },
\ {
- \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/other_file')),
+ \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/other_file')),
\ 'range': {
\ 'start': {'line': 7, 'character': 15},
\ },
@@ -396,13 +396,13 @@ Execute(LSP reference responses should be put to quickfix):
\ 'id': 3,
\ 'result': [
\ {
- \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
+ \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
\ 'range': {
\ 'start': {'line': 2, 'character': 7},
\ },
\ },
\ {
- \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/other_file')),
+ \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/other_file')),
\ 'range': {
\ 'start': {'line': 7, 'character': 15},
\ },
@@ -453,13 +453,13 @@ Execute(LSP reference requests should be sent):
\ [
\ [1, 'textDocument/didChange', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'version': g:ale_lsp_next_version_id - 1,
\ },
\ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}]
\ }],
\ [0, 'textDocument/references', {
- \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))},
+ \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))},
\ 'position': {'line': 0, 'character': 2},
\ 'context': {'includeDeclaration': v:false},
\ }],
diff --git a/test/test_go_to_definition.vader b/test/test_go_to_definition.vader
index 90e49979..fd2519b8 100644
--- a/test/test_go_to_definition.vader
+++ b/test/test_go_to_definition.vader
@@ -327,7 +327,7 @@ Execute(Other files should be jumped to for LSP definition responses):
\ {
\ 'id': 3,
\ 'result': {
- \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
+ \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
\ 'range': {
\ 'start': {'line': 2, 'character': 7},
\ },
@@ -350,7 +350,7 @@ Execute(Newer LocationLink items should be supported):
\ {
\ 'id': 3,
\ 'result': {
- \ 'targetUri': ale#path#ToURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
+ \ 'targetUri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
\ 'targetRange': {
\ 'start': {'line': 2, 'character': 7},
\ },
@@ -373,7 +373,7 @@ Execute(Locations inside the same file should be jumped to without using :edit):
\ {
\ 'id': 3,
\ 'result': {
- \ 'uri': ale#path#ToURI(ale#path#Simplify(expand('%:p'))),
+ \ 'uri': ale#path#ToFileURI(ale#path#Simplify(expand('%:p'))),
\ 'range': {
\ 'start': {'line': 2, 'character': 7},
\ },
@@ -395,7 +395,7 @@ Execute(Other files should be jumped to in tabs for LSP definition responses):
\ {
\ 'id': 3,
\ 'result': {
- \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
+ \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
\ 'range': {
\ 'start': {'line': 2, 'character': 7},
\ },
@@ -419,13 +419,13 @@ Execute(Definition responses with lists should be handled):
\ 'id': 3,
\ 'result': [
\ {
- \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
+ \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
\ 'range': {
\ 'start': {'line': 2, 'character': 7},
\ },
\ },
\ {
- \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/other_file')),
+ \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/other_file')),
\ 'range': {
\ 'start': {'line': 20, 'character': 3},
\ },
@@ -470,13 +470,13 @@ Execute(LSP definition requests should be sent):
\ [
\ [1, 'textDocument/didChange', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'version': g:ale_lsp_next_version_id - 1,
\ },
\ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}]
\ }],
\ [0, 'textDocument/definition', {
- \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))},
+ \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))},
\ 'position': {'line': 0, 'character': 2},
\ }],
\ ],
@@ -506,13 +506,13 @@ Execute(LSP type definition requests should be sent):
\ [
\ [1, 'textDocument/didChange', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'version': g:ale_lsp_next_version_id - 1,
\ },
\ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}]
\ }],
\ [0, 'textDocument/typeDefinition', {
- \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))},
+ \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))},
\ 'position': {'line': 0, 'character': 2},
\ }],
\ ],
@@ -542,13 +542,13 @@ Execute(LSP tab definition requests should be sent):
\ [
\ [1, 'textDocument/didChange', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'version': g:ale_lsp_next_version_id - 1,
\ },
\ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}]
\ }],
\ [0, 'textDocument/definition', {
- \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))},
+ \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))},
\ 'position': {'line': 0, 'character': 2},
\ }],
\ ],
@@ -578,13 +578,13 @@ Execute(LSP tab type definition requests should be sent):
\ [
\ [1, 'textDocument/didChange', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'version': g:ale_lsp_next_version_id - 1,
\ },
\ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}]
\ }],
\ [0, 'textDocument/typeDefinition', {
- \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))},
+ \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))},
\ 'position': {'line': 0, 'character': 2},
\ }],
\ ],
diff --git a/test/test_ignoring_linters.vader b/test/test_ignoring_linters.vader
index 19f45add..f97a0cf6 100644
--- a/test/test_ignoring_linters.vader
+++ b/test/test_ignoring_linters.vader
@@ -271,7 +271,7 @@ Execute(Buffer ignore lists should be applied for LSP linters):
\ 'jsonrpc': '2.0',
\ 'method': 'textDocument/publishDiagnostics',
\ 'params': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'diagnostics': [
\ {
\ 'severity': 1,
@@ -366,7 +366,7 @@ Execute(ale_disable_lsp should be applied for LSP linters):
\ 'jsonrpc': '2.0',
\ 'method': 'textDocument/publishDiagnostics',
\ 'params': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'diagnostics': [
\ {
\ 'severity': 1,
diff --git a/test/test_path_uri.vader b/test/test_path_uri.vader
index 0f2cba7e..e2daccf4 100644
--- a/test/test_path_uri.vader
+++ b/test/test_path_uri.vader
@@ -1,73 +1,73 @@
Before:
scriptencoding utf-8
-Execute(ale#path#ToURI should work for Windows paths):
- AssertEqual 'file:///C:/foo/bar/baz.tst', ale#path#ToURI('C:\foo\bar\baz.tst')
- AssertEqual 'foo/bar/baz.tst', ale#path#ToURI('foo\bar\baz.tst')
+Execute(ale#path#ToFileURI should work for Windows paths):
+ AssertEqual 'file:///C:/foo/bar/baz.tst', ale#path#ToFileURI('C:\foo\bar\baz.tst')
+ AssertEqual 'foo/bar/baz.tst', ale#path#ToFileURI('foo\bar\baz.tst')
-Execute(ale#path#FromURI should work for Unix paths):
- AssertEqual '/foo/bar/baz.tst', ale#path#FromURI('file:///foo/bar/baz.tst')
- AssertEqual '/foo/bar/baz.tst', ale#path#FromURI('file:/foo/bar/baz.tst')
- AssertEqual '/foo/bar/baz.tst', ale#path#FromURI('FILE:///foo/bar/baz.tst')
- AssertEqual '/foo/bar/baz.tst', ale#path#FromURI('FILE:/foo/bar/baz.tst')
+Execute(ale#path#FromFileURI should work for Unix paths):
+ AssertEqual '/foo/bar/baz.tst', ale#path#FromFileURI('file:///foo/bar/baz.tst')
+ AssertEqual '/foo/bar/baz.tst', ale#path#FromFileURI('file:/foo/bar/baz.tst')
+ AssertEqual '/foo/bar/baz.tst', ale#path#FromFileURI('FILE:///foo/bar/baz.tst')
+ AssertEqual '/foo/bar/baz.tst', ale#path#FromFileURI('FILE:/foo/bar/baz.tst')
-Execute(ale#path#FromURI should work for Windows paths):
+Execute(ale#path#FromFileURI should work for Windows paths):
if has('win32')
- AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('file:///C:/foo/bar/baz.tst')
- AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('file:/C:/foo/bar/baz.tst')
- AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromURI('file:///c:/foo/bar/baz.tst')
- AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromURI('file:/c:/foo/bar/baz.tst')
- AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('FILE:///C:/foo/bar/baz.tst')
- AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('FILE:/C:/foo/bar/baz.tst')
+ AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('file:///C:/foo/bar/baz.tst')
+ AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('file:/C:/foo/bar/baz.tst')
+ AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromFileURI('file:///c:/foo/bar/baz.tst')
+ AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromFileURI('file:/c:/foo/bar/baz.tst')
+ AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('FILE:///C:/foo/bar/baz.tst')
+ AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('FILE:/C:/foo/bar/baz.tst')
else
- AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromURI('file:///C:/foo/bar/baz.tst')
- AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromURI('file:/C:/foo/bar/baz.tst')
- AssertEqual '/c:/foo/bar/baz.tst', ale#path#FromURI('file:///c:/foo/bar/baz.tst')
- AssertEqual '/c:/foo/bar/baz.tst', ale#path#FromURI('file:/c:/foo/bar/baz.tst')
- AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromURI('FILE:///C:/foo/bar/baz.tst')
- AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromURI('FILE:/C:/foo/bar/baz.tst')
+ AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromFileURI('file:///C:/foo/bar/baz.tst')
+ AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromFileURI('file:/C:/foo/bar/baz.tst')
+ AssertEqual '/c:/foo/bar/baz.tst', ale#path#FromFileURI('file:///c:/foo/bar/baz.tst')
+ AssertEqual '/c:/foo/bar/baz.tst', ale#path#FromFileURI('file:/c:/foo/bar/baz.tst')
+ AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromFileURI('FILE:///C:/foo/bar/baz.tst')
+ AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromFileURI('FILE:/C:/foo/bar/baz.tst')
endif
-Execute(ale#path#FromURI parse Windows paths with a pipe):
+Execute(ale#path#FromFileURI parse Windows paths with a pipe):
if has('win32')
- AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('file:///C|/foo/bar/baz.tst')
- AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('file:/C|/foo/bar/baz.tst')
- AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromURI('file:///c|/foo/bar/baz.tst')
- AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromURI('file:/c|/foo/bar/baz.tst')
- AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('FILE:///C|/foo/bar/baz.tst')
- AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('FILE:/C|/foo/bar/baz.tst')
+ AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('file:///C|/foo/bar/baz.tst')
+ AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('file:/C|/foo/bar/baz.tst')
+ AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromFileURI('file:///c|/foo/bar/baz.tst')
+ AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromFileURI('file:/c|/foo/bar/baz.tst')
+ AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('FILE:///C|/foo/bar/baz.tst')
+ AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('FILE:/C|/foo/bar/baz.tst')
else
- AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromURI('file:///C|/foo/bar/baz.tst')
- AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromURI('file:/C|/foo/bar/baz.tst')
- AssertEqual '/c|/foo/bar/baz.tst', ale#path#FromURI('file:///c|/foo/bar/baz.tst')
- AssertEqual '/c|/foo/bar/baz.tst', ale#path#FromURI('file:/c|/foo/bar/baz.tst')
- AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromURI('FILE:///C|/foo/bar/baz.tst')
- AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromURI('FILE:/C|/foo/bar/baz.tst')
+ AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromFileURI('file:///C|/foo/bar/baz.tst')
+ AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromFileURI('file:/C|/foo/bar/baz.tst')
+ AssertEqual '/c|/foo/bar/baz.tst', ale#path#FromFileURI('file:///c|/foo/bar/baz.tst')
+ AssertEqual '/c|/foo/bar/baz.tst', ale#path#FromFileURI('file:/c|/foo/bar/baz.tst')
+ AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromFileURI('FILE:///C|/foo/bar/baz.tst')
+ AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromFileURI('FILE:/C|/foo/bar/baz.tst')
endif
-Execute(ale#path#FromURI should handle the colon for the drive letter being encoded):
+Execute(ale#path#FromFileURI should handle the colon for the drive letter being encoded):
" These URIs shouldn't be created, but we'll handle them anyway.
if has('win32')
- AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('file:///C%3A/foo/bar/baz.tst')
+ AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('file:///C%3A/foo/bar/baz.tst')
else
- AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromURI('file:///C%3A/foo/bar/baz.tst')
+ AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromFileURI('file:///C%3A/foo/bar/baz.tst')
endif
-Execute(ale#path#ToURI should work for Unix paths):
- AssertEqual 'file:///foo/bar/baz.tst', ale#path#ToURI('/foo/bar/baz.tst')
- AssertEqual 'foo/bar/baz.tst', ale#path#ToURI('foo/bar/baz.tst')
+Execute(ale#path#ToFileURI should work for Unix paths):
+ AssertEqual 'file:///foo/bar/baz.tst', ale#path#ToFileURI('/foo/bar/baz.tst')
+ AssertEqual 'foo/bar/baz.tst', ale#path#ToFileURI('foo/bar/baz.tst')
-Execute(ale#path#ToURI should keep safe characters):
- AssertEqual '//a-zA-Z0-9$-_.!*''(),', ale#path#ToURI('\/a-zA-Z0-9$-_.!*''(),')
+Execute(ale#path#ToFileURI should keep safe characters):
+ AssertEqual '//a-zA-Z0-9$-_.!*''(),', ale#path#ToFileURI('\/a-zA-Z0-9$-_.!*''(),')
-Execute(ale#path#ToURI should percent encode unsafe characters):
- AssertEqual '%20%2b%3a%3f%26%3d', ale#path#ToURI(' +:?&=')
+Execute(ale#path#ToFileURI should percent encode unsafe characters):
+ AssertEqual '%20%2b%3a%3f%26%3d', ale#path#ToFileURI(' +:?&=')
-Execute(ale#path#FromURI should decode percent encodings):
- AssertEqual ' +:?&=', ale#path#FromURI('%20%2b%3a%3f%26%3d')
+Execute(ale#path#FromFileURI should decode percent encodings):
+ AssertEqual ' +:?&=', ale#path#FromFileURI('%20%2b%3a%3f%26%3d')
-Execute(ale#path#ToURI should handle UTF-8):
- AssertEqual 'file:///T%c3%a9l%c3%a9chargement', ale#path#ToURI('/Téléchargement')
+Execute(ale#path#ToFileURI should handle UTF-8):
+ AssertEqual 'file:///T%c3%a9l%c3%a9chargement', ale#path#ToFileURI('/Téléchargement')
-Execute(ale#path#FromURI should handle UTF-8):
- AssertEqual '/Téléchargement', ale#path#FromURI('file:///T%C3%A9l%C3%A9chargement')
+Execute(ale#path#FromFileURI should handle UTF-8):
+ AssertEqual '/Téléchargement', ale#path#FromFileURI('file:///T%C3%A9l%C3%A9chargement')
diff --git a/test/test_rename.vader b/test/test_rename.vader
index 4298715f..83f0aa7e 100644
--- a/test/test_rename.vader
+++ b/test/test_rename.vader
@@ -487,13 +487,13 @@ Execute(LSP rename requests should be sent):
\ [
\ [1, 'textDocument/didChange', {
\ 'textDocument': {
- \ 'uri': ale#path#ToURI(expand('%:p')),
+ \ 'uri': ale#path#ToFileURI(expand('%:p')),
\ 'version': g:ale_lsp_next_version_id - 1,
\ },
\ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}]
\ }],
\ [0, 'textDocument/rename', {
- \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))},
+ \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))},
\ 'position': {'line': 0, 'character': 2},
\ 'newName': 'a-new-name',
\ }],
diff --git a/test/test_symbol_search.vader b/test/test_symbol_search.vader
index 382b2b40..754826aa 100644
--- a/test/test_symbol_search.vader
+++ b/test/test_symbol_search.vader
@@ -94,7 +94,7 @@ Execute(LSP symbol responses should be handled):
\ {
\ 'name': 'foo',
\ 'location': {
- \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
+ \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
\ 'range': {
\ 'start': {'line': 2, 'character': 7},
\ },
@@ -103,7 +103,7 @@ Execute(LSP symbol responses should be handled):
\ {
\ 'name': 'foobar',
\ 'location': {
- \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/other_file')),
+ \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/other_file')),
\ 'range': {
\ 'start': {'line': 7, 'character': 15},
\ },