-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote branch 'origin/master' into edge
- Loading branch information
Showing
5 changed files
with
245 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
with Ada.Text_IO; | ||
|
||
procedure Main is | ||
A : constant String := (1 .. 0 => 'a'); | ||
begin | ||
if A'Last in A'Range then | ||
Ada.Text_IO.Put_Line ("Hello"); | ||
end if; | ||
end Main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
project Test is | ||
for Main use ("main.adb"); | ||
end Test; |
228 changes: 228 additions & 0 deletions
228
testsuite/ada_lsp/completion.aggregates.string/test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,228 @@ | ||
[ | ||
{ | ||
"comment": [ | ||
"Test the completion provider inside a string aggregate.", | ||
"No exception should happen." | ||
] | ||
}, { | ||
"start": { | ||
"cmd": [ | ||
"${ALS}" | ||
] | ||
} | ||
}, | ||
{ | ||
"send": { | ||
"request": { | ||
"params": { | ||
"processId": 31570, | ||
"capabilities": { | ||
"textDocument": { | ||
"completion": { | ||
"completionItem": { | ||
"documentationFormat": [ | ||
"plaintext", | ||
"markdown" | ||
], | ||
"snippetSupport": true | ||
}, | ||
"dynamicRegistration": true | ||
}, | ||
"definition": {}, | ||
"hover": {}, | ||
"formatting": { | ||
"dynamicRegistration": true | ||
}, | ||
"implementation": {}, | ||
"codeLens": {}, | ||
"typeDefinition": {}, | ||
"selectionRange": {}, | ||
"documentHighlight": {}, | ||
"documentSymbol": { | ||
"hierarchicalDocumentSymbolSupport": true | ||
}, | ||
"synchronization": {}, | ||
"references": {}, | ||
"rangeFormatting": {}, | ||
"onTypeFormatting": {}, | ||
"declaration": {}, | ||
"foldingRange": { | ||
"lineFoldingOnly": true | ||
}, | ||
"colorProvider": {} | ||
}, | ||
"workspace": { | ||
"applyEdit": true, | ||
"executeCommand": {}, | ||
"didChangeWatchedFiles": {}, | ||
"workspaceEdit": {}, | ||
"didChangeConfiguration": {} | ||
} | ||
}, | ||
"rootUri": "$URI{.}" | ||
}, | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"method": "initialize" | ||
}, | ||
"wait": [ | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"result": { | ||
"capabilities": { | ||
"textDocumentSync": 2, | ||
"completionProvider": { | ||
"triggerCharacters": [ | ||
".", | ||
",", | ||
"'", | ||
"(" | ||
], | ||
"resolveProvider": true | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"send": { | ||
"request": { | ||
"jsonrpc": "2.0", | ||
"method": "initialized" | ||
}, | ||
"wait": [] | ||
} | ||
}, | ||
{ | ||
"send": { | ||
"request": { | ||
"params": { | ||
"settings": { | ||
"ada": { | ||
"scenarioVariables": {}, | ||
"enableDiagnostics": false, | ||
"defaultCharset": "ISO-8859-1" | ||
} | ||
} | ||
}, | ||
"jsonrpc": "2.0", | ||
"method": "workspace/didChangeConfiguration" | ||
}, | ||
"wait": [] | ||
} | ||
}, | ||
{ | ||
"send": { | ||
"request": { | ||
"jsonrpc": "2.0", | ||
"method": "textDocument/didOpen", | ||
"params": { | ||
"textDocument": { | ||
"uri": "$URI{main.adb}", | ||
"languageId": "Ada", | ||
"version": 0, | ||
"text": "with Ada.Text_IO;\n\nprocedure Main is\n A : constant String := (1 .. 0 => 'a');\nbegin\n if A'Last in A'Range then\n Ada.Text_IO.Put_Line (\"Hello\");\n end if;\nend Main;\n" | ||
} | ||
} | ||
}, | ||
"wait": [] | ||
} | ||
}, | ||
{ | ||
"send": { | ||
"request": { | ||
"jsonrpc": "2.0", | ||
"id": 7, | ||
"method": "textDocument/completion", | ||
"params": { | ||
"textDocument": { | ||
"uri": "$URI{main.adb}" | ||
}, | ||
"position": { | ||
"line": 3, | ||
"character": 33 | ||
}, | ||
"context": { | ||
"triggerKind": 1 | ||
} | ||
} | ||
}, | ||
"wait": [ | ||
{ | ||
"id": 7, | ||
"result": { | ||
"isIncomplete": false, | ||
"items": [] | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"send": { | ||
"request": { | ||
"jsonrpc": "2.0", | ||
"id": 8, | ||
"method": "textDocument/completion", | ||
"params": { | ||
"textDocument": { | ||
"uri": "$URI{main.adb}" | ||
}, | ||
"position": { | ||
"line": 3, | ||
"character": 33 | ||
}, | ||
"context": { | ||
"triggerKind": 1 | ||
} | ||
} | ||
}, | ||
"wait": [ | ||
{ | ||
"id": 8, | ||
"result": { | ||
"isIncomplete": false, | ||
"items": [] | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"send": { | ||
"request": { | ||
"jsonrpc": "2.0", | ||
"method": "textDocument/didClose", | ||
"params": { | ||
"textDocument": { | ||
"uri": "$URI{src/main.adb" | ||
} | ||
} | ||
}, | ||
"wait": [] | ||
} | ||
}, | ||
{ | ||
"send": { | ||
"request": { | ||
"jsonrpc": "2.0", | ||
"id": 9, | ||
"method": "shutdown" | ||
}, | ||
"wait": [ | ||
{ | ||
"id": 9, | ||
"result": null | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"stop": { | ||
"exit_code": 0 | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title: 'completion.aggregates.string' |