aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-01-06 13:43:46 +0100
committertgingold <tgingold@users.noreply.github.com>2021-01-07 18:44:50 +0100
commitcb3c1053a36c0c80167c5af3404693eabd898f6c (patch)
tree7529fae373ff5d59cff38e6db12ba06690c3679a /testsuite
parentd3ad83012baca2e80bb4f34c8ccbf1f52c2f9100 (diff)
downloadghdl-cb3c1053a36c0c80167c5af3404693eabd898f6c.tar.gz
ghdl-cb3c1053a36c0c80167c5af3404693eabd898f6c.tar.bz2
ghdl-cb3c1053a36c0c80167c5af3404693eabd898f6c.zip
Added json files from https://github.com/ghdl/ghdl-language-server repository.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/pyunit/lsp/001simple/cmds.json229
-rw-r--r--testsuite/pyunit/lsp/001simple/replies.json34
-rw-r--r--testsuite/pyunit/lsp/001simple/replies.ref5
-rw-r--r--testsuite/pyunit/lsp/002coverage/cmds.json471
-rw-r--r--testsuite/pyunit/lsp/002coverage/cmds.lsp35
-rw-r--r--testsuite/pyunit/lsp/002coverage/hdl-prj.json5
-rw-r--r--testsuite/pyunit/lsp/002coverage/replies.json627
-rw-r--r--testsuite/pyunit/lsp/002coverage/replies.ref33
-rw-r--r--testsuite/pyunit/lsp/002coverage/vhdl-ls.trace.in11
-rw-r--r--testsuite/pyunit/lsp/002coverage/vhdl-ls.trace.out9
-rw-r--r--testsuite/pyunit/lsp/003errors/cmds.json245
-rw-r--r--testsuite/pyunit/lsp/003errors/crash1.json229
-rw-r--r--testsuite/pyunit/lsp/003errors/crash2.json239
-rw-r--r--testsuite/pyunit/lsp/003errors/replies.json110
-rw-r--r--testsuite/pyunit/lsp/003errors/tc.vhdl12
-rw-r--r--testsuite/pyunit/lsp/004errprj/cmds.json180
-rw-r--r--testsuite/pyunit/lsp/004errprj/hdl-prj.json3
-rw-r--r--testsuite/pyunit/lsp/004errprj/replies.json42
-rw-r--r--testsuite/pyunit/lsp/005create/cmds.json248
-rw-r--r--testsuite/pyunit/lsp/005create/replies.json31
-rw-r--r--testsuite/pyunit/lsp/005opterr/cmds.json260
-rw-r--r--testsuite/pyunit/lsp/005opterr/hdl-prj.json4
-rw-r--r--testsuite/pyunit/lsp/005opterr/replies.json116
-rw-r--r--testsuite/pyunit/lsp/007errprj/cmds.json168
-rw-r--r--testsuite/pyunit/lsp/007errprj/hdl-prj.json3
-rw-r--r--testsuite/pyunit/lsp/007errprj/replies.json34
-rw-r--r--testsuite/pyunit/lsp/008errnofile/cmds.json244
-rw-r--r--testsuite/pyunit/lsp/008errnofile/hdl-prj.json4
-rw-r--r--testsuite/pyunit/lsp/008errnofile/replies.json39
-rw-r--r--testsuite/pyunit/lsp/files/adder.vhdl16
-rw-r--r--testsuite/pyunit/lsp/files/adder_tb.vhdl60
-rw-r--r--testsuite/pyunit/lsp/files/heartbeat.vhdl22
-rw-r--r--testsuite/pyunit/lsp/files/hello.vhdl19
33 files changed, 3787 insertions, 0 deletions
diff --git a/testsuite/pyunit/lsp/001simple/cmds.json b/testsuite/pyunit/lsp/001simple/cmds.json
new file mode 100644
index 000000000..e67503258
--- /dev/null
+++ b/testsuite/pyunit/lsp/001simple/cmds.json
@@ -0,0 +1,229 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "method": "initialize",
+ "params": {
+ "processId": 2,
+ "rootPath": ".",
+ "rootUri": "file:///.",
+ "capabilities": {
+ "workspace": {
+ "applyEdit": true,
+ "workspaceEdit": {
+ "documentChanges": true
+ },
+ "didChangeConfiguration": {
+ "dynamicRegistration": true
+ },
+ "didChangeWatchedFiles": {
+ "dynamicRegistration": true
+ },
+ "symbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ }
+ },
+ "executeCommand": {
+ "dynamicRegistration": true
+ },
+ "configuration": true,
+ "workspaceFolders": true
+ },
+ "textDocument": {
+ "publishDiagnostics": {
+ "relatedInformation": true
+ },
+ "synchronization": {
+ "dynamicRegistration": true,
+ "willSave": true,
+ "willSaveWaitUntil": true,
+ "didSave": true
+ },
+ "completion": {
+ "dynamicRegistration": true,
+ "contextSupport": true,
+ "completionItem": {
+ "snippetSupport": true,
+ "commitCharactersSupport": true,
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ],
+ "deprecatedSupport": true
+ },
+ "completionItemKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25
+ ]
+ }
+ },
+ "hover": {
+ "dynamicRegistration": true,
+ "contentFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ },
+ "signatureHelp": {
+ "dynamicRegistration": true,
+ "signatureInformation": {
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ }
+ },
+ "definition": {
+ "dynamicRegistration": true
+ },
+ "references": {
+ "dynamicRegistration": true
+ },
+ "documentHighlight": {
+ "dynamicRegistration": true
+ },
+ "documentSymbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ }
+ },
+ "codeAction": {
+ "dynamicRegistration": true
+ },
+ "codeLens": {
+ "dynamicRegistration": true
+ },
+ "formatting": {
+ "dynamicRegistration": true
+ },
+ "rangeFormatting": {
+ "dynamicRegistration": true
+ },
+ "onTypeFormatting": {
+ "dynamicRegistration": true
+ },
+ "rename": {
+ "dynamicRegistration": true
+ },
+ "documentLink": {
+ "dynamicRegistration": true
+ },
+ "typeDefinition": {
+ "dynamicRegistration": true
+ },
+ "implementation": {
+ "dynamicRegistration": true
+ },
+ "colorProvider": {
+ "dynamicRegistration": true
+ }
+ }
+ },
+ "trace": "off",
+ "workspaceFolders": [
+ {
+ "uri": "file:///.",
+ "name": "001simple"
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "initialized",
+ "params": {}
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/didOpen",
+ "params": {
+ "textDocument": {
+ "uri": "file:///../files/hello.vhdl",
+ "languageId": "vhdl",
+ "version": 1,
+ "text": "\n-- Hello world program\nuse std.textio.all; -- Imports the standard textio package.\n\n-- Defines a design entity, without any ports.\nentity hello_world is\nend hello_world;\n\narchitecture behaviour of hello_world is\nbegin\n process\n variable l : line;\n begin\n write (l, String'(\"Hello world!\"));\n writeline (output, l);\n wait;\n end process;\nend behaviour;\n\n"
+ }
+ }
+ }
+]
diff --git a/testsuite/pyunit/lsp/001simple/replies.json b/testsuite/pyunit/lsp/001simple/replies.json
new file mode 100644
index 000000000..55a84917b
--- /dev/null
+++ b/testsuite/pyunit/lsp/001simple/replies.json
@@ -0,0 +1,34 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "result": {
+ "capabilities": {
+ "textDocumentSync": {
+ "openClose": true,
+ "change": 2,
+ "save": {
+ "includeText": true
+ }
+ },
+ "hoverProvider": false,
+ "definitionProvider": true,
+ "referencesProvider": false,
+ "documentHighlightProvider": false,
+ "documentSymbolProvider": true,
+ "codeActionProvider": false,
+ "documentFormattingProvider": false,
+ "documentRangeFormattingProvider": true,
+ "renameProvider": false
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/publishDiagnostics",
+ "params": {
+ "uri": "file:///../files/hello.vhdl",
+ "diagnostics": []
+ }
+ }
+]
diff --git a/testsuite/pyunit/lsp/001simple/replies.ref b/testsuite/pyunit/lsp/001simple/replies.ref
new file mode 100644
index 000000000..57f020a7f
--- /dev/null
+++ b/testsuite/pyunit/lsp/001simple/replies.ref
@@ -0,0 +1,5 @@
+Content-Length: 393
+
+{"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{"includeText":true}},"hoverProvider":false,"definitionProvider":true,"referencesProvider":false,"documentHighlightProvider":false,"documentSymbolProvider":true,"codeActionProvider":false,"documentFormattingProvider":false,"documentRangeFormattingProvider":false,"renameProvider":false}}}Content-Length: 124
+
+{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///../files/hello.vhdl","diagnostics":[]}} \ No newline at end of file
diff --git a/testsuite/pyunit/lsp/002coverage/cmds.json b/testsuite/pyunit/lsp/002coverage/cmds.json
new file mode 100644
index 000000000..132cabcda
--- /dev/null
+++ b/testsuite/pyunit/lsp/002coverage/cmds.json
@@ -0,0 +1,471 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "method": "initialize",
+ "params": {
+ "processId": 11082,
+ "rootPath": "/home/tgingold/work/vhdl-language-server/tests/002coverage",
+ "rootUri": "file:///home/tgingold/work/vhdl-language-server/tests/002coverage",
+ "capabilities": {
+ "workspace": {
+ "applyEdit": true,
+ "workspaceEdit": {
+ "documentChanges": true
+ },
+ "didChangeConfiguration": {
+ "dynamicRegistration": true
+ },
+ "didChangeWatchedFiles": {
+ "dynamicRegistration": true
+ },
+ "symbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ }
+ },
+ "executeCommand": {
+ "dynamicRegistration": true
+ },
+ "configuration": true,
+ "workspaceFolders": true
+ },
+ "textDocument": {
+ "publishDiagnostics": {
+ "relatedInformation": true
+ },
+ "synchronization": {
+ "dynamicRegistration": true,
+ "willSave": true,
+ "willSaveWaitUntil": true,
+ "didSave": true
+ },
+ "completion": {
+ "dynamicRegistration": true,
+ "contextSupport": true,
+ "completionItem": {
+ "snippetSupport": true,
+ "commitCharactersSupport": true,
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ],
+ "deprecatedSupport": true
+ },
+ "completionItemKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25
+ ]
+ }
+ },
+ "hover": {
+ "dynamicRegistration": true,
+ "contentFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ },
+ "signatureHelp": {
+ "dynamicRegistration": true,
+ "signatureInformation": {
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ }
+ },
+ "definition": {
+ "dynamicRegistration": true
+ },
+ "references": {
+ "dynamicRegistration": true
+ },
+ "documentHighlight": {
+ "dynamicRegistration": true
+ },
+ "documentSymbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ }
+ },
+ "codeAction": {
+ "dynamicRegistration": true
+ },
+ "codeLens": {
+ "dynamicRegistration": true
+ },
+ "formatting": {
+ "dynamicRegistration": true
+ },
+ "rangeFormatting": {
+ "dynamicRegistration": true
+ },
+ "onTypeFormatting": {
+ "dynamicRegistration": true
+ },
+ "rename": {
+ "dynamicRegistration": true
+ },
+ "documentLink": {
+ "dynamicRegistration": true
+ },
+ "typeDefinition": {
+ "dynamicRegistration": true
+ },
+ "implementation": {
+ "dynamicRegistration": true
+ },
+ "colorProvider": {
+ "dynamicRegistration": true
+ }
+ }
+ },
+ "trace": "off",
+ "workspaceFolders": [
+ {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/002coverage",
+ "name": "002coverage"
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "initialized",
+ "params": {}
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/didOpen",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "languageId": "vhdl",
+ "version": 1,
+ "text": "\nentity adder is\n -- `i0`, `i1`, and the carry-in `ci` are inputs of the adder.\n -- `s` is the sum output, `co` is the carry-out.\n port (i0, i1 : in bit; ci : in bit; s : out bit; co : out bit);\nend adder;\n\narchitecture rtl of adder is\nbegin\n -- This full-adder architecture contains two concurrent assignments.\n -- Compute the sum.\n s <= i0 xor i1 xor ci;\n -- Compute the carry.\n co <= (i0 and i1) or (i0 and ci) or (i1 and ci);\nend rtl;\n\n"
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 1,
+ "method": "textDocument/documentSymbol",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl"
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/didOpen",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl",
+ "languageId": "vhdl",
+ "version": 1,
+ "text": "\n-- A testbench has no ports.\nentity adder_tb is\nend adder_tb;\n\narchitecture behav of adder_tb is\n -- Declaration of the component that will be instantiated.\n component adder\n port (i0, i1 : in bit; ci : in bit; s : out bit; co : out bit);\n end component;\n\n -- Specifies which entity is bound with the component.\n for adder_0: adder use entity work.adder;\n signal i0, i1, ci, s, co : bit;\nbegin\n -- Component instantiation.\n adder_0: adder port map (i0 => i0, i1 => i1, ci => ci,\n s => s, co => co);\n\n -- This process does the real job.\n process\n type pattern_type is record\n -- The inputs of the adder.\n i0, i1, ci : bit;\n -- The expected outputs of the adder.\n s, co : bit;\n end record;\n -- The patterns to apply.\n type pattern_array is array (natural range <>) of pattern_type;\n constant patterns : pattern_array :=\n (('0', '0', '0', '0', '0'),\n ('0', '0', '1', '1', '0'),\n ('0', '1', '0', '1', '0'),\n ('0', '1', '1', '0', '1'),\n ('1', '0', '0', '1', '0'),\n ('1', '0', '1', '0', '1'),\n ('1', '1', '0', '0', '1'),\n ('1', '1', '1', '1', '1'));\n begin\n -- Check each pattern.\n for i in patterns'range loop\n -- Set the inputs.\n i0 <= patterns(i).i0;\n i1 <= patterns(i).i1;\n ci <= patterns(i).ci;\n -- Wait for the results.\n wait for 1 ns;\n -- Check the outputs.\n assert s = patterns(i).s\n report \"bad sum value\" severity error;\n assert co = patterns(i).co\n report \"bad carry out value\" severity error;\n end loop;\n assert false report \"end of test\" severity note;\n -- Wait forever; this will finish the simulation.\n wait;\n end process;\nend behav;\n\n\n"
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 2,
+ "method": "textDocument/documentSymbol",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl"
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 3,
+ "method": "textDocument/definition",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl"
+ },
+ "position": {
+ "line": 12,
+ "character": 39
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/didChange",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "version": 2
+ },
+ "contentChanges": [
+ {
+ "range": {
+ "start": {
+ "line": 11,
+ "character": 24
+ },
+ "end": {
+ "line": 11,
+ "character": 24
+ }
+ },
+ "rangeLength": 0,
+ "text": "\n "
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 4,
+ "method": "textDocument/documentSymbol",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl"
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/didChange",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "version": 3
+ },
+ "contentChanges": [
+ {
+ "range": {
+ "start": {
+ "line": 12,
+ "character": 2
+ },
+ "end": {
+ "line": 12,
+ "character": 2
+ }
+ },
+ "rangeLength": 0,
+ "text": "e"
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 5,
+ "method": "textDocument/documentSymbol",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl"
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/didChange",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "version": 4
+ },
+ "contentChanges": [
+ {
+ "range": {
+ "start": {
+ "line": 12,
+ "character": 3
+ },
+ "end": {
+ "line": 12,
+ "character": 3
+ }
+ },
+ "rangeLength": 0,
+ "text": "r"
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/didChange",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "version": 5
+ },
+ "contentChanges": [
+ {
+ "range": {
+ "start": {
+ "line": 12,
+ "character": 4
+ },
+ "end": {
+ "line": 12,
+ "character": 4
+ }
+ },
+ "rangeLength": 0,
+ "text": "r"
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 6,
+ "method": "textDocument/documentSymbol",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl"
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/didChange",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "version": 6
+ },
+ "contentChanges": [
+ {
+ "range": {
+ "start": {
+ "line": 12,
+ "character": 5
+ },
+ "end": {
+ "line": 12,
+ "character": 5
+ }
+ },
+ "rangeLength": 0,
+ "text": ";"
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 7,
+ "method": "textDocument/documentSymbol",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl"
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/didChange",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "version": 7
+ },
+ "contentChanges": [
+ {
+ "range": {
+ "start": {
+ "line": 12,
+ "character": 2
+ },
+ "end": {
+ "line": 13,
+ "character": 2
+ }
+ },
+ "rangeLength": 7,
+ "text": ""
+ }
+ ]
+ }
+ }
+]
diff --git a/testsuite/pyunit/lsp/002coverage/cmds.lsp b/testsuite/pyunit/lsp/002coverage/cmds.lsp
new file mode 100644
index 000000000..5d9745df3
--- /dev/null
+++ b/testsuite/pyunit/lsp/002coverage/cmds.lsp
@@ -0,0 +1,35 @@
+Content-Length: 2167
+
+{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":11082,"rootPath":"/home/tgingold/work/vhdl-language-server/tests/002coverage","rootUri":"file:///home/tgingold/work/vhdl-language-server/tests/002coverage","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"]}},"definition":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"codeAction":{"dynamicRegistration":true},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true},"typeDefinition":{"dynamicRegistration":true},"implementation":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true}}},"trace":"off","workspaceFolders":[{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/002coverage","name":"002coverage"}]}}Content-Length: 52
+
+{"jsonrpc":"2.0","method":"initialized","params":{}}Content-Length: 665
+
+{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","languageId":"vhdl","version":1,"text":"\nentity adder is\n -- `i0`, `i1`, and the carry-in `ci` are inputs of the adder.\n -- `s` is the sum output, `co` is the carry-out.\n port (i0, i1 : in bit; ci : in bit; s : out bit; co : out bit);\nend adder;\n\narchitecture rtl of adder is\nbegin\n -- This full-adder architecture contains two concurrent assignments.\n -- Compute the sum.\n s <= i0 xor i1 xor ci;\n -- Compute the carry.\n co <= (i0 and i1) or (i0 and ci) or (i1 and ci);\nend rtl;\n\n"}}}Content-Length: 170
+
+{"jsonrpc":"2.0","id":1,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl"}}}Content-Length: 2026
+
+{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","languageId":"vhdl","version":1,"text":"\n-- A testbench has no ports.\nentity adder_tb is\nend adder_tb;\n\narchitecture behav of adder_tb is\n -- Declaration of the component that will be instantiated.\n component adder\n port (i0, i1 : in bit; ci : in bit; s : out bit; co : out bit);\n end component;\n\n -- Specifies which entity is bound with the component.\n for adder_0: adder use entity work.adder;\n signal i0, i1, ci, s, co : bit;\nbegin\n -- Component instantiation.\n adder_0: adder port map (i0 => i0, i1 => i1, ci => ci,\n s => s, co => co);\n\n -- This process does the real job.\n process\n type pattern_type is record\n -- The inputs of the adder.\n i0, i1, ci : bit;\n -- The expected outputs of the adder.\n s, co : bit;\n end record;\n -- The patterns to apply.\n type pattern_array is array (natural range <>) of pattern_type;\n constant patterns : pattern_array :=\n (('0', '0', '0', '0', '0'),\n ('0', '0', '1', '1', '0'),\n ('0', '1', '0', '1', '0'),\n ('0', '1', '1', '0', '1'),\n ('1', '0', '0', '1', '0'),\n ('1', '0', '1', '0', '1'),\n ('1', '1', '0', '0', '1'),\n ('1', '1', '1', '1', '1'));\n begin\n -- Check each pattern.\n for i in patterns'range loop\n -- Set the inputs.\n i0 <= patterns(i).i0;\n i1 <= patterns(i).i1;\n ci <= patterns(i).ci;\n -- Wait for the results.\n wait for 1 ns;\n -- Check the outputs.\n assert s = patterns(i).s\n report \"bad sum value\" severity error;\n assert co = patterns(i).co\n report \"bad carry out value\" severity error;\n end loop;\n assert false report \"end of test\" severity note;\n -- Wait forever; this will finish the simulation.\n wait;\n end process;\nend behav;\n\n\n"}}}Content-Length: 173
+
+{"jsonrpc":"2.0","id":2,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl"}}}Content-Length: 207
+
+{"jsonrpc":"2.0","id":3,"method":"textDocument/definition","params":{"textDocument":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl"},"position":{"line":12,"character":39}}}Content-Length: 299
+
+{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","version":2},"contentChanges":[{"range":{"start":{"line":11,"character":24},"end":{"line":11,"character":24}},"rangeLength":0,"text":"\n "}]}}Content-Length: 170
+
+{"jsonrpc":"2.0","id":4,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl"}}}Content-Length: 294
+
+{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","version":3},"contentChanges":[{"range":{"start":{"line":12,"character":2},"end":{"line":12,"character":2}},"rangeLength":0,"text":"e"}]}}Content-Length: 170
+
+{"jsonrpc":"2.0","id":5,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl"}}}Content-Length: 294
+
+{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","version":4},"contentChanges":[{"range":{"start":{"line":12,"character":3},"end":{"line":12,"character":3}},"rangeLength":0,"text":"r"}]}}Content-Length: 294
+
+{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","version":5},"contentChanges":[{"range":{"start":{"line":12,"character":4},"end":{"line":12,"character":4}},"rangeLength":0,"text":"r"}]}}Content-Length: 170
+
+{"jsonrpc":"2.0","id":6,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl"}}}Content-Length: 294
+
+{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","version":6},"contentChanges":[{"range":{"start":{"line":12,"character":5},"end":{"line":12,"character":5}},"rangeLength":0,"text":";"}]}}Content-Length: 170
+
+{"jsonrpc":"2.0","id":7,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl"}}}Content-Length: 293
+
+{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","version":7},"contentChanges":[{"range":{"start":{"line":12,"character":2},"end":{"line":13,"character":2}},"rangeLength":7,"text":""}]}} \ No newline at end of file
diff --git a/testsuite/pyunit/lsp/002coverage/hdl-prj.json b/testsuite/pyunit/lsp/002coverage/hdl-prj.json
new file mode 100644
index 000000000..d4ef345e7
--- /dev/null
+++ b/testsuite/pyunit/lsp/002coverage/hdl-prj.json
@@ -0,0 +1,5 @@
+{ "files": [
+ { "file": "../files/adder.vhdl", "language": "vhdl" },
+ { "file": "../files/heartbeat.vhdl", "language": "vhdl" },
+ { "file": "../files/adder_tb.vhdl", "language": "vhdl" }
+]}
diff --git a/testsuite/pyunit/lsp/002coverage/replies.json b/testsuite/pyunit/lsp/002coverage/replies.json
new file mode 100644
index 000000000..f573052cb
--- /dev/null
+++ b/testsuite/pyunit/lsp/002coverage/replies.json
@@ -0,0 +1,627 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "result": {
+ "capabilities": {
+ "textDocumentSync": {
+ "openClose": true,
+ "change": 2,
+ "save": {
+ "includeText": true
+ }
+ },
+ "hoverProvider": false,
+ "definitionProvider": true,
+ "referencesProvider": false,
+ "documentHighlightProvider": false,
+ "documentSymbolProvider": true,
+ "codeActionProvider": false,
+ "documentFormattingProvider": false,
+ "documentRangeFormattingProvider": true,
+ "renameProvider": false
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/publishDiagnostics",
+ "params": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "diagnostics": []
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 1,
+ "result": [
+ {
+ "kind": 2,
+ "name": "adder",
+ "location": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "range": {
+ "start": {
+ "line": 1,
+ "character": 0
+ },
+ "end": {
+ "line": 5,
+ "character": 0
+ }
+ }
+ }
+ },
+ {
+ "kind": 2,
+ "name": "rtl",
+ "location": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "range": {
+ "start": {
+ "line": 7,
+ "character": 0
+ },
+ "end": {
+ "line": 14,
+ "character": 0
+ }
+ }
+ }
+ }
+ ]
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/publishDiagnostics",
+ "params": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl",
+ "diagnostics": []
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 2,
+ "result": [
+ {
+ "kind": 2,
+ "name": "adder_tb",
+ "location": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl",
+ "range": {
+ "start": {
+ "line": 2,
+ "character": 0
+ },
+ "end": {
+ "line": 3,
+ "character": 0
+ }
+ }
+ }
+ },
+ {
+ "kind": 2,
+ "name": "behav",
+ "location": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl",
+ "range": {
+ "start": {
+ "line": 5,
+ "character": 0
+ },
+ "end": {
+ "line": 57,
+ "character": 0
+ }
+ }
+ }
+ },
+ {
+ "kind": 6,
+ "name": "adder_0",
+ "location": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl",
+ "range": {
+ "start": {
+ "line": 16,
+ "character": 2
+ },
+ "end": {
+ "line": 16,
+ "character": 9
+ }
+ }
+ },
+ "containerName": {
+ "kind": 2,
+ "name": "behav",
+ "location": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl",
+ "range": {
+ "start": {
+ "line": 5,
+ "character": 0
+ },
+ "end": {
+ "line": 57,
+ "character": 0
+ }
+ }
+ }
+ }
+ }
+ ]
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 3,
+ "result": [
+ {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "range": {
+ "start": {
+ "line": 1,
+ "character": 7
+ },
+ "end": {
+ "line": 1,
+ "character": 12
+ }
+ }
+ }
+ ]
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/publishDiagnostics",
+ "params": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "diagnostics": []
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 4,
+ "result": [
+ {
+ "kind": 2,
+ "name": "adder",
+ "location": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "range": {
+ "start": {
+ "line": 1,
+ "character": 0
+ },
+ "end": {
+ "line": 5,
+ "character": 0
+ }
+ }
+ }
+ },
+ {
+ "kind": 2,
+ "name": "rtl",
+ "location": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "range": {
+ "start": {
+ "line": 7,
+ "character": 0
+ },
+ "end": {
+ "line": 15,
+ "character": 0
+ }
+ }
+ }
+ }
+ ]
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/publishDiagnostics",
+ "params": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "diagnostics": [
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 14,
+ "character": 2
+ },
+ "end": {
+ "line": 14,
+ "character": 2
+ }
+ },
+ "message": "'<=' is expected instead of \"co\"",
+ "severity": 1
+ },
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 12,
+ "character": 2
+ },
+ "end": {
+ "line": 12,
+ "character": 2
+ }
+ },
+ "message": "no declaration for \"e\"",
+ "severity": 1
+ },
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 12,
+ "character": 2
+ },
+ "end": {
+ "line": 12,
+ "character": 2
+ }
+ },
+ "message": "target is not a signal name",
+ "severity": 1
+ },
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 14,
+ "character": 2
+ },
+ "end": {
+ "line": 14,
+ "character": 2
+ }
+ },
+ "message": "port \"co\" cannot be read",
+ "severity": 1
+ },
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 14,
+ "character": 20
+ },
+ "end": {
+ "line": 14,
+ "character": 20
+ }
+ },
+ "message": "no function declarations for operator \"or\"",
+ "severity": 1
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 5,
+ "result": [
+ {
+ "kind": 2,
+ "name": "adder",
+ "location": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "range": {
+ "start": {
+ "line": 1,
+ "character": 0
+ },
+ "end": {
+ "line": 5,
+ "character": 0
+ }
+ }
+ }
+ },
+ {
+ "kind": 2,
+ "name": "rtl",
+ "location": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "range": {
+ "start": {
+ "line": 7,
+ "character": 0
+ },
+ "end": {
+ "line": 15,
+ "character": 0
+ }
+ }
+ }
+ }
+ ]
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/publishDiagnostics",
+ "params": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "diagnostics": [
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 14,
+ "character": 2
+ },
+ "end": {
+ "line": 14,
+ "character": 2
+ }
+ },
+ "message": "'<=' is expected instead of \"co\"",
+ "severity": 1
+ },
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 12,
+ "character": 2
+ },
+ "end": {
+ "line": 12,
+ "character": 2
+ }
+ },
+ "message": "no declaration for \"er\"",
+ "severity": 1
+ },
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 12,
+ "character": 2
+ },
+ "end": {
+ "line": 12,
+ "character": 2
+ }
+ },
+ "message": "target is not a signal name",
+ "severity": 1
+ },
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 14,
+ "character": 2
+ },
+ "end": {
+ "line": 14,
+ "character": 2
+ }
+ },
+ "message": "port \"co\" cannot be read",
+ "severity": 1
+ },
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 14,
+ "character": 20
+ },
+ "end": {
+ "line": 14,
+ "character": 20
+ }
+ },
+ "message": "no function declarations for operator \"or\"",
+ "severity": 1
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/publishDiagnostics",
+ "params": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "diagnostics": [
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 14,
+ "character": 2
+ },
+ "end": {
+ "line": 14,
+ "character": 2
+ }
+ },
+ "message": "'<=' is expected instead of \"co\"",
+ "severity": 1
+ },
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 12,
+ "character": 2
+ },
+ "end": {
+ "line": 12,
+ "character": 2
+ }
+ },
+ "message": "no declaration for \"err\"",
+ "severity": 1
+ },
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 12,
+ "character": 2
+ },
+ "end": {
+ "line": 12,
+ "character": 2
+ }
+ },
+ "message": "target is not a signal name",
+ "severity": 1
+ },
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 14,
+ "character": 2
+ },
+ "end": {
+ "line": 14,
+ "character": 2
+ }
+ },
+ "message": "port \"co\" cannot be read",
+ "severity": 1
+ },
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 14,
+ "character": 20
+ },
+ "end": {
+ "line": 14,
+ "character": 20
+ }
+ },
+ "message": "no function declarations for operator \"or\"",
+ "severity": 1
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 6,
+ "result": [
+ {
+ "kind": 2,
+ "name": "adder",
+ "location": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "range": {
+ "start": {
+ "line": 1,
+ "character": 0
+ },
+ "end": {
+ "line": 5,
+ "character": 0
+ }
+ }
+ }
+ },
+ {
+ "kind": 2,
+ "name": "rtl",
+ "location": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "range": {
+ "start": {
+ "line": 7,
+ "character": 0
+ },
+ "end": {
+ "line": 15,
+ "character": 0
+ }
+ }
+ }
+ }
+ ]
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/publishDiagnostics",
+ "params": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "diagnostics": [
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 12,
+ "character": 2
+ },
+ "end": {
+ "line": 12,
+ "character": 2
+ }
+ },
+ "message": "no declaration for \"err\"",
+ "severity": 1
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 7,
+ "result": [
+ {
+ "kind": 2,
+ "name": "adder",
+ "location": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "range": {
+ "start": {
+ "line": 1,
+ "character": 0
+ },
+ "end": {
+ "line": 5,
+ "character": 0
+ }
+ }
+ }
+ },
+ {
+ "kind": 2,
+ "name": "rtl",
+ "location": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "range": {
+ "start": {
+ "line": 7,
+ "character": 0
+ },
+ "end": {
+ "line": 15,
+ "character": 0
+ }
+ }
+ }
+ }
+ ]
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/publishDiagnostics",
+ "params": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl",
+ "diagnostics": []
+ }
+ }
+]
diff --git a/testsuite/pyunit/lsp/002coverage/replies.ref b/testsuite/pyunit/lsp/002coverage/replies.ref
new file mode 100644
index 000000000..8fb0ac08c
--- /dev/null
+++ b/testsuite/pyunit/lsp/002coverage/replies.ref
@@ -0,0 +1,33 @@
+Content-Length: 393
+
+{"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{"includeText":true}},"hoverProvider":false,"definitionProvider":true,"referencesProvider":false,"documentHighlightProvider":false,"documentSymbolProvider":true,"codeActionProvider":false,"documentFormattingProvider":false,"documentRangeFormattingProvider":false,"renameProvider":false}}}Content-Length: 167
+
+{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","diagnostics":[]}}Content-Length: 2423
+
+{"jsonrpc":"2.0","id":1,"result":[{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}},{"kind":13,"name":"i0","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":8},"end":{"line":4,"character":10}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"i1","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":12},"end":{"line":4,"character":14}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"ci","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":25},"end":{"line":4,"character":27}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"s","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":38},"end":{"line":4,"character":39}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"co","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":51},"end":{"line":4,"character":53}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":2,"name":"rtl","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":7,"character":13},"end":{"line":7,"character":16}}}}]}Content-Length: 170
+
+{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","diagnostics":[]}}Content-Length: 6405
+
+{"jsonrpc":"2.0","id":2,"result":[{"kind":2,"name":"adder_tb","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":2,"character":7},"end":{"line":2,"character":15}}}},{"kind":2,"name":"behav","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":5,"character":13},"end":{"line":5,"character":18}}}},{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":7,"character":12},"end":{"line":7,"character":17}}},"containerName":{"kind":2,"name":"behav","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":5,"character":13},"end":{"line":5,"character":18}}}}},{"kind":13,"name":"i0","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":8,"character":10},"end":{"line":8,"character":12}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":7,"character":12},"end":{"line":7,"character":17}}},"containerName":{"kind":2,"name":"behav","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":5,"character":13},"end":{"line":5,"character":18}}}}}},{"kind":13,"name":"i1","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":8,"character":14},"end":{"line":8,"character":16}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":7,"character":12},"end":{"line":7,"character":17}}},"containerName":{"kind":2,"name":"behav","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":5,"character":13},"end":{"line":5,"character":18}}}}}},{"kind":13,"name":"ci","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":8,"character":27},"end":{"line":8,"character":29}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":7,"character":12},"end":{"line":7,"character":17}}},"containerName":{"kind":2,"name":"behav","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":5,"character":13},"end":{"line":5,"character":18}}}}}},{"kind":13,"name":"s","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":8,"character":40},"end":{"line":8,"character":41}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":7,"character":12},"end":{"line":7,"character":17}}},"containerName":{"kind":2,"name":"behav","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":5,"character":13},"end":{"line":5,"character":18}}}}}},{"kind":13,"name":"co","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":8,"character":53},"end":{"line":8,"character":55}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":7,"character":12},"end":{"line":7,"character":17}}},"containerName":{"kind":2,"name":"behav","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":5,"character":13},"end":{"line":5,"character":18}}}}}},{"kind":13,"name":"i0","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":13,"character":9},"end":{"line":13,"character":11}}},"containerName":{"kind":2,"name":"behav","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":5,"character":13},"end":{"line":5,"character":18}}}}},{"kind":13,"name":"i1","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":13,"character":13},"end":{"line":13,"character":15}}},"containerName":{"kind":2,"name":"behav","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":5,"character":13},"end":{"line":5,"character":18}}}}},{"kind":13,"name":"ci","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":13,"character":17},"end":{"line":13,"character":19}}},"containerName":{"kind":2,"name":"behav","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":5,"character":13},"end":{"line":5,"character":18}}}}},{"kind":13,"name":"s","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":13,"character":21},"end":{"line":13,"character":22}}},"containerName":{"kind":2,"name":"behav","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":5,"character":13},"end":{"line":5,"character":18}}}}},{"kind":13,"name":"co","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":13,"character":24},"end":{"line":13,"character":26}}},"containerName":{"kind":2,"name":"behav","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":5,"character":13},"end":{"line":5,"character":18}}}}},{"kind":6,"name":"adder_0","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":16,"character":2},"end":{"line":16,"character":9}}},"containerName":{"kind":2,"name":"behav","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder_tb.vhdl","range":{"start":{"line":5,"character":13},"end":{"line":5,"character":18}}}}}]}Content-Length: 191
+
+{"jsonrpc":"2.0","id":3,"result":[{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}]}Content-Length: 167
+
+{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","diagnostics":[]}}Content-Length: 2423
+
+{"jsonrpc":"2.0","id":4,"result":[{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}},{"kind":13,"name":"i0","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":8},"end":{"line":4,"character":10}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"i1","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":12},"end":{"line":4,"character":14}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"ci","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":25},"end":{"line":4,"character":27}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"s","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":38},"end":{"line":4,"character":39}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"co","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":51},"end":{"line":4,"character":53}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":2,"name":"rtl","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":7,"character":13},"end":{"line":7,"character":16}}}}]}Content-Length: 923
+
+{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","diagnostics":[{"source":"ghdl","range":{"start":{"line":14,"character":2},"end":{"line":14,"character":2}},"message":"'<=' is expected instead of \"co\"","severity":1},{"source":"ghdl","range":{"start":{"line":12,"character":2},"end":{"line":12,"character":2}},"message":"no declaration for \"e\"","severity":1},{"source":"ghdl","range":{"start":{"line":12,"character":2},"end":{"line":12,"character":2}},"message":"target is not a signal name","severity":1},{"source":"ghdl","range":{"start":{"line":14,"character":2},"end":{"line":14,"character":2}},"message":"port \"co\" cannot be read","severity":1},{"source":"ghdl","range":{"start":{"line":14,"character":20},"end":{"line":14,"character":20}},"message":"no function declarations for operator \"or\"","severity":1}]}}Content-Length: 2423
+
+{"jsonrpc":"2.0","id":5,"result":[{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}},{"kind":13,"name":"i0","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":8},"end":{"line":4,"character":10}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"i1","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":12},"end":{"line":4,"character":14}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"ci","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":25},"end":{"line":4,"character":27}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"s","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":38},"end":{"line":4,"character":39}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"co","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":51},"end":{"line":4,"character":53}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":2,"name":"rtl","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":7,"character":13},"end":{"line":7,"character":16}}}}]}Content-Length: 924
+
+{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","diagnostics":[{"source":"ghdl","range":{"start":{"line":14,"character":2},"end":{"line":14,"character":2}},"message":"'<=' is expected instead of \"co\"","severity":1},{"source":"ghdl","range":{"start":{"line":12,"character":2},"end":{"line":12,"character":2}},"message":"no declaration for \"er\"","severity":1},{"source":"ghdl","range":{"start":{"line":12,"character":2},"end":{"line":12,"character":2}},"message":"target is not a signal name","severity":1},{"source":"ghdl","range":{"start":{"line":14,"character":2},"end":{"line":14,"character":2}},"message":"port \"co\" cannot be read","severity":1},{"source":"ghdl","range":{"start":{"line":14,"character":20},"end":{"line":14,"character":20}},"message":"no function declarations for operator \"or\"","severity":1}]}}Content-Length: 925
+
+{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","diagnostics":[{"source":"ghdl","range":{"start":{"line":14,"character":2},"end":{"line":14,"character":2}},"message":"'<=' is expected instead of \"co\"","severity":1},{"source":"ghdl","range":{"start":{"line":12,"character":2},"end":{"line":12,"character":2}},"message":"no declaration for \"err\"","severity":1},{"source":"ghdl","range":{"start":{"line":12,"character":2},"end":{"line":12,"character":2}},"message":"target is not a signal name","severity":1},{"source":"ghdl","range":{"start":{"line":14,"character":2},"end":{"line":14,"character":2}},"message":"port \"co\" cannot be read","severity":1},{"source":"ghdl","range":{"start":{"line":14,"character":20},"end":{"line":14,"character":20}},"message":"no function declarations for operator \"or\"","severity":1}]}}Content-Length: 2423
+
+{"jsonrpc":"2.0","id":6,"result":[{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}},{"kind":13,"name":"i0","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":8},"end":{"line":4,"character":10}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"i1","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":12},"end":{"line":4,"character":14}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"ci","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":25},"end":{"line":4,"character":27}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"s","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":38},"end":{"line":4,"character":39}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"co","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":51},"end":{"line":4,"character":53}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":2,"name":"rtl","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":7,"character":13},"end":{"line":7,"character":16}}}}]}Content-Length: 312
+
+{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","diagnostics":[{"source":"ghdl","range":{"start":{"line":12,"character":2},"end":{"line":12,"character":2}},"message":"no declaration for \"err\"","severity":1}]}}Content-Length: 2423
+
+{"jsonrpc":"2.0","id":7,"result":[{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}},{"kind":13,"name":"i0","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":8},"end":{"line":4,"character":10}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"i1","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":12},"end":{"line":4,"character":14}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"ci","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":25},"end":{"line":4,"character":27}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"s","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":38},"end":{"line":4,"character":39}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"co","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":51},"end":{"line":4,"character":53}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":2,"name":"rtl","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":7,"character":13},"end":{"line":7,"character":16}}}}]}Content-Length: 167
+
+{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","diagnostics":[]}} \ No newline at end of file
diff --git a/testsuite/pyunit/lsp/002coverage/vhdl-ls.trace.in b/testsuite/pyunit/lsp/002coverage/vhdl-ls.trace.in
new file mode 100644
index 000000000..8c3112447
--- /dev/null
+++ b/testsuite/pyunit/lsp/002coverage/vhdl-ls.trace.in
@@ -0,0 +1,11 @@
+Content-Length: 2167
+
+{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":22858,"rootPath":"/home/tgingold/work/vhdl-language-server/tests/002coverage","rootUri":"file:///home/tgingold/work/vhdl-language-server/tests/002coverage","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"]}},"definition":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"codeAction":{"dynamicRegistration":true},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true},"typeDefinition":{"dynamicRegistration":true},"implementation":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true}}},"trace":"off","workspaceFolders":[{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/002coverage","name":"002coverage"}]}}Content-Length: 52
+
+{"jsonrpc":"2.0","method":"initialized","params":{}}Content-Length: 665
+
+{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","languageId":"vhdl","version":1,"text":"\nentity adder is\n -- `i0`, `i1`, and the carry-in `ci` are inputs of the adder.\n -- `s` is the sum output, `co` is the carry-out.\n port (i0, i1 : in bit; ci : in bit; s : out bit; co : out bit);\nend adder;\n\narchitecture rtl of adder is\nbegin\n -- This full-adder architecture contains two concurrent assignments.\n -- Compute the sum.\n s <= i0 xor i1 xor ci;\n -- Compute the carry.\n co <= (i0 and i1) or (i0 and ci) or (i1 and ci);\nend rtl;\n\n"}}}Content-Length: 170
+
+{"jsonrpc":"2.0","id":1,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl"}}}Content-Length: 58
+
+{"jsonrpc":"2.0","id":2,"method":"shutdown","params":null} \ No newline at end of file
diff --git a/testsuite/pyunit/lsp/002coverage/vhdl-ls.trace.out b/testsuite/pyunit/lsp/002coverage/vhdl-ls.trace.out
new file mode 100644
index 000000000..a31574b10
--- /dev/null
+++ b/testsuite/pyunit/lsp/002coverage/vhdl-ls.trace.out
@@ -0,0 +1,9 @@
+Content-Length: 393
+
+{"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{"includeText":true}},"hoverProvider":false,"definitionProvider":true,"referencesProvider":false,"documentHighlightProvider":false,"documentSymbolProvider":true,"codeActionProvider":false,"documentFormattingProvider":false,"documentRangeFormattingProvider":false,"renameProvider":false}}}Content-Length: 167
+
+{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","diagnostics":[]}}Content-Length: 2423
+
+{"jsonrpc":"2.0","id":1,"result":[{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}},{"kind":13,"name":"i0","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":8},"end":{"line":4,"character":10}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"i1","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":12},"end":{"line":4,"character":14}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"ci","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":25},"end":{"line":4,"character":27}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"s","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":38},"end":{"line":4,"character":39}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":13,"name":"co","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":4,"character":51},"end":{"line":4,"character":53}}},"containerName":{"kind":2,"name":"adder","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":12}}}}},{"kind":2,"name":"rtl","location":{"uri":"file:///home/tgingold/work/vhdl-language-server/tests/files/adder.vhdl","range":{"start":{"line":7,"character":13},"end":{"line":7,"character":16}}}}]}Content-Length: 38
+
+{"jsonrpc":"2.0","id":2,"result":null} \ No newline at end of file
diff --git a/testsuite/pyunit/lsp/003errors/cmds.json b/testsuite/pyunit/lsp/003errors/cmds.json
new file mode 100644
index 000000000..03d6b1e37
--- /dev/null
+++ b/testsuite/pyunit/lsp/003errors/cmds.json
@@ -0,0 +1,245 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "method": "initialize",
+ "params": {
+ "processId": 5529,
+ "rootPath": "/home/tgingold/work/vhdl-language-server/tests/003errors",
+ "rootUri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors",
+ "capabilities": {
+ "workspace": {
+ "applyEdit": true,
+ "workspaceEdit": {
+ "documentChanges": true
+ },
+ "didChangeConfiguration": {
+ "dynamicRegistration": true
+ },
+ "didChangeWatchedFiles": {
+ "dynamicRegistration": true
+ },
+ "symbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ }
+ },
+ "executeCommand": {
+ "dynamicRegistration": true
+ },
+ "configuration": true,
+ "workspaceFolders": true
+ },
+ "textDocument": {
+ "publishDiagnostics": {
+ "relatedInformation": true
+ },
+ "synchronization": {
+ "dynamicRegistration": true,
+ "willSave": true,
+ "willSaveWaitUntil": true,
+ "didSave": true
+ },
+ "completion": {
+ "dynamicRegistration": true,
+ "contextSupport": true,
+ "completionItem": {
+ "snippetSupport": true,
+ "commitCharactersSupport": true,
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ],
+ "deprecatedSupport": true
+ },
+ "completionItemKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25
+ ]
+ }
+ },
+ "hover": {
+ "dynamicRegistration": true,
+ "contentFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ },
+ "signatureHelp": {
+ "dynamicRegistration": true,
+ "signatureInformation": {
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ }
+ },
+ "definition": {
+ "dynamicRegistration": true
+ },
+ "references": {
+ "dynamicRegistration": true
+ },
+ "documentHighlight": {
+ "dynamicRegistration": true
+ },
+ "documentSymbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ }
+ },
+ "codeAction": {
+ "dynamicRegistration": true
+ },
+ "codeLens": {
+ "dynamicRegistration": true
+ },
+ "formatting": {
+ "dynamicRegistration": true
+ },
+ "rangeFormatting": {
+ "dynamicRegistration": true
+ },
+ "onTypeFormatting": {
+ "dynamicRegistration": true
+ },
+ "rename": {
+ "dynamicRegistration": true
+ },
+ "documentLink": {
+ "dynamicRegistration": true
+ },
+ "typeDefinition": {
+ "dynamicRegistration": true
+ },
+ "implementation": {
+ "dynamicRegistration": true
+ },
+ "colorProvider": {
+ "dynamicRegistration": true
+ }
+ }
+ },
+ "trace": "off",
+ "workspaceFolders": [
+ {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors",
+ "name": "003errors"
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "initialized",
+ "params": {}
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/didOpen",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors/tc.vhdl",
+ "languageId": "vhdl",
+ "version": 1,
+ "text": "library ieee;\nuse ieee.std_logic_1164.all;\nuse ieee.std_logic_unsigned.all;\n\nentity tb is\nend tb;\n\narchitecture behav of tb is\n signal s : std_logic_vector(7 downto 0);\nbegin\n assert s /= x\"73\";\nend behav; \n"
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 1,
+ "method": "textDocument/documentSymbol",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors/tc.vhdl"
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 2,
+ "method": "shutdown",
+ "params": null
+ }
+]
diff --git a/testsuite/pyunit/lsp/003errors/crash1.json b/testsuite/pyunit/lsp/003errors/crash1.json
new file mode 100644
index 000000000..155770d78
--- /dev/null
+++ b/testsuite/pyunit/lsp/003errors/crash1.json
@@ -0,0 +1,229 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "method": "initialize",
+ "params": {
+ "processId": 27805,
+ "rootPath": "/home/tgingold/work/vhdl-language-server/tests/003errors",
+ "rootUri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors",
+ "capabilities": {
+ "workspace": {
+ "applyEdit": true,
+ "workspaceEdit": {
+ "documentChanges": true
+ },
+ "didChangeConfiguration": {
+ "dynamicRegistration": true
+ },
+ "didChangeWatchedFiles": {
+ "dynamicRegistration": true
+ },
+ "symbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ }
+ },
+ "executeCommand": {
+ "dynamicRegistration": true
+ },
+ "configuration": true,
+ "workspaceFolders": true
+ },
+ "textDocument": {
+ "publishDiagnostics": {
+ "relatedInformation": true
+ },
+ "synchronization": {
+ "dynamicRegistration": true,
+ "willSave": true,
+ "willSaveWaitUntil": true,
+ "didSave": true
+ },
+ "completion": {
+ "dynamicRegistration": true,
+ "contextSupport": true,
+ "completionItem": {
+ "snippetSupport": true,
+ "commitCharactersSupport": true,
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ],
+ "deprecatedSupport": true
+ },
+ "completionItemKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25
+ ]
+ }
+ },
+ "hover": {
+ "dynamicRegistration": true,
+ "contentFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ },
+ "signatureHelp": {
+ "dynamicRegistration": true,
+ "signatureInformation": {
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ }
+ },
+ "definition": {
+ "dynamicRegistration": true
+ },
+ "references": {
+ "dynamicRegistration": true
+ },
+ "documentHighlight": {
+ "dynamicRegistration": true
+ },
+ "documentSymbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ }
+ },
+ "codeAction": {
+ "dynamicRegistration": true
+ },
+ "codeLens": {
+ "dynamicRegistration": true
+ },
+ "formatting": {
+ "dynamicRegistration": true
+ },
+ "rangeFormatting": {
+ "dynamicRegistration": true
+ },
+ "onTypeFormatting": {
+ "dynamicRegistration": true
+ },
+ "rename": {
+ "dynamicRegistration": true
+ },
+ "documentLink": {
+ "dynamicRegistration": true
+ },
+ "typeDefinition": {
+ "dynamicRegistration": true
+ },
+ "implementation": {
+ "dynamicRegistration": true
+ },
+ "colorProvider": {
+ "dynamicRegistration": true
+ }
+ }
+ },
+ "trace": "off",
+ "workspaceFolders": [
+ {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors",
+ "name": "003errors"
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "initialized",
+ "params": {}
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/didOpen",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors/tc.vhdl",
+ "languageId": "vhdl",
+ "version": 74,
+ "text": "library ieee;\nuse ieee.std_logic_1164.all;\nuse ieee.std_logic_unsigned.all;\n\nentity \n"
+ }
+ }
+ }
+]
diff --git a/testsuite/pyunit/lsp/003errors/crash2.json b/testsuite/pyunit/lsp/003errors/crash2.json
new file mode 100644
index 000000000..ab12ed3bf
--- /dev/null
+++ b/testsuite/pyunit/lsp/003errors/crash2.json
@@ -0,0 +1,239 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "method": "initialize",
+ "params": {
+ "processId": 30387,
+ "rootPath": "/home/tgingold/work/vhdl-language-server/tests/003errors",
+ "rootUri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors",
+ "capabilities": {
+ "workspace": {
+ "applyEdit": true,
+ "workspaceEdit": {
+ "documentChanges": true
+ },
+ "didChangeConfiguration": {
+ "dynamicRegistration": true
+ },
+ "didChangeWatchedFiles": {
+ "dynamicRegistration": true
+ },
+ "symbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ }
+ },
+ "executeCommand": {
+ "dynamicRegistration": true
+ },
+ "configuration": true,
+ "workspaceFolders": true
+ },
+ "textDocument": {
+ "publishDiagnostics": {
+ "relatedInformation": true
+ },
+ "synchronization": {
+ "dynamicRegistration": true,
+ "willSave": true,
+ "willSaveWaitUntil": true,
+ "didSave": true
+ },
+ "completion": {
+ "dynamicRegistration": true,
+ "contextSupport": true,
+ "completionItem": {
+ "snippetSupport": true,
+ "commitCharactersSupport": true,
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ],
+ "deprecatedSupport": true
+ },
+ "completionItemKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25
+ ]
+ }
+ },
+ "hover": {
+ "dynamicRegistration": true,
+ "contentFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ },
+ "signatureHelp": {
+ "dynamicRegistration": true,
+ "signatureInformation": {
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ }
+ },
+ "definition": {
+ "dynamicRegistration": true
+ },
+ "references": {
+ "dynamicRegistration": true
+ },
+ "documentHighlight": {
+ "dynamicRegistration": true
+ },
+ "documentSymbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ }
+ },
+ "codeAction": {
+ "dynamicRegistration": true
+ },
+ "codeLens": {
+ "dynamicRegistration": true
+ },
+ "formatting": {
+ "dynamicRegistration": true
+ },
+ "rangeFormatting": {
+ "dynamicRegistration": true
+ },
+ "onTypeFormatting": {
+ "dynamicRegistration": true
+ },
+ "rename": {
+ "dynamicRegistration": true
+ },
+ "documentLink": {
+ "dynamicRegistration": true
+ },
+ "typeDefinition": {
+ "dynamicRegistration": true
+ },
+ "implementation": {
+ "dynamicRegistration": true
+ },
+ "colorProvider": {
+ "dynamicRegistration": true
+ }
+ }
+ },
+ "trace": "off",
+ "workspaceFolders": [
+ {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors",
+ "name": "003errors"
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "initialized",
+ "params": {}
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/didOpen",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors/tc.vhdl",
+ "languageId": "vhdl",
+ "version": 172,
+ "text": "library ieee;\nuse ieee.std_logic_1164.all;\nuse ieee.std_logic_unsigned.all;\n\nentity tb is\nend tb;\n\narchitecture behav of tb is\n signal s : std_logic_vector(7 downto 0);\nbegin\n assert s != x\"73\";\n end process;\nend behav; \n"
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 1,
+ "method": "textDocument/documentSymbol",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors/tc.vhdl"
+ }
+ }
+ }
+]
diff --git a/testsuite/pyunit/lsp/003errors/replies.json b/testsuite/pyunit/lsp/003errors/replies.json
new file mode 100644
index 000000000..02e9cac85
--- /dev/null
+++ b/testsuite/pyunit/lsp/003errors/replies.json
@@ -0,0 +1,110 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "result": {
+ "capabilities": {
+ "textDocumentSync": {
+ "openClose": true,
+ "change": 2,
+ "save": {
+ "includeText": true
+ }
+ },
+ "hoverProvider": false,
+ "definitionProvider": true,
+ "referencesProvider": false,
+ "documentHighlightProvider": false,
+ "documentSymbolProvider": true,
+ "codeActionProvider": false,
+ "documentFormattingProvider": false,
+ "documentRangeFormattingProvider": true,
+ "renameProvider": false
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/publishDiagnostics",
+ "params": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors/tc.vhdl",
+ "diagnostics": [
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 2,
+ "character": 9
+ },
+ "end": {
+ "line": 2,
+ "character": 9
+ }
+ },
+ "message": "unit \"std_logic_unsigned\" not found in library \"ieee\"",
+ "severity": 1
+ },
+ {
+ "source": "ghdl",
+ "range": {
+ "start": {
+ "line": 2,
+ "character": 9
+ },
+ "end": {
+ "line": 2,
+ "character": 9
+ }
+ },
+ "message": " (use --ieee=synopsys for non-standard synopsys packages)",
+ "severity": 1
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 1,
+ "result": [
+ {
+ "kind": 2,
+ "name": "tb",
+ "location": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors/tc.vhdl",
+ "range": {
+ "start": {
+ "line": 4,
+ "character": 0
+ },
+ "end": {
+ "line": 5,
+ "character": 0
+ }
+ }
+ }
+ },
+ {
+ "kind": 2,
+ "name": "behav",
+ "location": {
+ "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors/tc.vhdl",
+ "range": {
+ "start": {
+ "line": 7,
+ "character": 0
+ },
+ "end": {
+ "line": 11,
+ "character": 0
+ }
+ }
+ }
+ }
+ ]
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 2,
+ "result": null
+ }
+]
diff --git a/testsuite/pyunit/lsp/003errors/tc.vhdl b/testsuite/pyunit/lsp/003errors/tc.vhdl
new file mode 100644
index 000000000..6308aeb6f
--- /dev/null
+++ b/testsuite/pyunit/lsp/003errors/tc.vhdl
@@ -0,0 +1,12 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.std_logic_unsigned.all;
+
+entity tb is
+end tb;
+
+architecture behav of tb is
+ signal s : std_logic_vector(7 downto 0);
+begin
+ assert s /= x"73";
+end behav;
diff --git a/testsuite/pyunit/lsp/004errprj/cmds.json b/testsuite/pyunit/lsp/004errprj/cmds.json
new file mode 100644
index 000000000..813a6cb50
--- /dev/null
+++ b/testsuite/pyunit/lsp/004errprj/cmds.json
@@ -0,0 +1,180 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "method": "initialize",
+ "params": {
+ "processId": 2,
+ "rootPath": ".",
+ "rootUri": "file://.",
+ "capabilities": {
+ "workspace": {
+ "applyEdit": true,
+ "workspaceEdit": {
+ "documentChanges": true
+ },
+ "symbol": {
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ }
+ },
+ "configuration": true,
+ "workspaceFolders": true
+ },
+ "textDocument": {
+ "publishDiagnostics": {
+ "relatedInformation": true
+ },
+ "synchronization": {
+ "dynamicRegistration": true,
+ "willSave": true,
+ "willSaveWaitUntil": true,
+ "didSave": true
+ },
+ "completion": {
+ "dynamicRegistration": true,
+ "contextSupport": true,
+ "completionItem": {
+ "snippetSupport": true,
+ "commitCharactersSupport": true,
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ],
+ "deprecatedSupport": true
+ },
+ "completionItemKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25
+ ]
+ }
+ },
+ "hover": {
+ "dynamicRegistration": true,
+ "contentFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ },
+ "signatureHelp": {
+ "dynamicRegistration": true,
+ "signatureInformation": {
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ }
+ },
+ "documentSymbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ }
+ }
+ }
+ },
+ "trace": "off",
+ "workspaceFolders": [
+ {
+ "uri": "file:///.",
+ "name": "workspacename"
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "initialized",
+ "params": {}
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/didOpen",
+ "params": {
+ "textDocument": {
+ "uri": "file:///../files/hello.vhdl",
+ "languageId": "vhdl",
+ "version": 1,
+ "text": "\n-- Hello world program\nuse std.textio.all; -- Imports the standard textio package.\n\n-- Defines a design entity, without any ports.\nentity hello_world is\nend hello_world;\n\narchitecture behaviour of hello_world is\nbegin\n process\n variable l : line;\n begin\n write (l, String'(\"Hello world!\"));\n writeline (output, l);\n wait;\n end process;\nend behaviour;\n\n"
+ }
+ }
+ }
+]
diff --git a/testsuite/pyunit/lsp/004errprj/hdl-prj.json b/testsuite/pyunit/lsp/004errprj/hdl-prj.json
new file mode 100644
index 000000000..1711a10f6
--- /dev/null
+++ b/testsuite/pyunit/lsp/004errprj/hdl-prj.json
@@ -0,0 +1,3 @@
+{ files: [
+ { "file": "../files/heartbeat.vhdl", "language": "vhdl" },
+]}
diff --git a/testsuite/pyunit/lsp/004errprj/replies.json b/testsuite/pyunit/lsp/004errprj/replies.json
new file mode 100644
index 000000000..4c7f38082
--- /dev/null
+++ b/testsuite/pyunit/lsp/004errprj/replies.json
@@ -0,0 +1,42 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "method": "window/showMessage",
+ "params": {
+ "type": 1,
+ "message": "json error in project file ./hdl-prj.json:1:3"
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "result": {
+ "capabilities": {
+ "textDocumentSync": {
+ "openClose": true,
+ "change": 2,
+ "save": {
+ "includeText": true
+ }
+ },
+ "hoverProvider": false,
+ "definitionProvider": true,
+ "referencesProvider": false,
+ "documentHighlightProvider": false,
+ "documentSymbolProvider": true,
+ "codeActionProvider": false,
+ "documentFormattingProvider": false,
+ "documentRangeFormattingProvider": true,
+ "renameProvider": false
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/publishDiagnostics",
+ "params": {
+ "uri": "file:///../files/hello.vhdl",
+ "diagnostics": []
+ }
+ }
+]
diff --git a/testsuite/pyunit/lsp/005create/cmds.json b/testsuite/pyunit/lsp/005create/cmds.json
new file mode 100644
index 000000000..c4748062f
--- /dev/null
+++ b/testsuite/pyunit/lsp/005create/cmds.json
@@ -0,0 +1,248 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "method": "initialize",
+ "params": {
+ "processId": 6576,
+ "rootPath": ".",
+ "rootUri": "file://.",
+ "capabilities": {
+ "workspace": {
+ "applyEdit": true,
+ "workspaceEdit": {
+ "documentChanges": true
+ },
+ "didChangeConfiguration": {
+ "dynamicRegistration": true
+ },
+ "didChangeWatchedFiles": {
+ "dynamicRegistration": true
+ },
+ "symbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ }
+ },
+ "executeCommand": {
+ "dynamicRegistration": true
+ },
+ "configuration": true,
+ "workspaceFolders": true
+ },
+ "textDocument": {
+ "publishDiagnostics": {
+ "relatedInformation": true
+ },
+ "synchronization": {
+ "dynamicRegistration": true,
+ "willSave": true,
+ "willSaveWaitUntil": true,
+ "didSave": true
+ },
+ "completion": {
+ "dynamicRegistration": true,
+ "contextSupport": true,
+ "completionItem": {
+ "snippetSupport": true,
+ "commitCharactersSupport": true,
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ],
+ "deprecatedSupport": true,
+ "preselectSupport": true
+ },
+ "completionItemKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25
+ ]
+ }
+ },
+ "hover": {
+ "dynamicRegistration": true,
+ "contentFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ },
+ "signatureHelp": {
+ "dynamicRegistration": true,
+ "signatureInformation": {
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ }
+ },
+ "definition": {
+ "dynamicRegistration": true
+ },
+ "references": {
+ "dynamicRegistration": true
+ },
+ "documentHighlight": {
+ "dynamicRegistration": true
+ },
+ "documentSymbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ },
+ "hierarchicalDocumentSymbolSupport": true
+ },
+ "codeAction": {
+ "dynamicRegistration": true,
+ "codeActionLiteralSupport": {
+ "codeActionKind": {
+ "valueSet": [
+ "",
+ "quickfix",
+ "refactor",
+ "refactor.extract",
+ "refactor.inline",
+ "refactor.rewrite",
+ "source",
+ "source.organizeImports"
+ ]
+ }
+ }
+ },
+ "codeLens": {
+ "dynamicRegistration": true
+ },
+ "formatting": {
+ "dynamicRegistration": true
+ },
+ "rangeFormatting": {
+ "dynamicRegistration": true
+ },
+ "onTypeFormatting": {
+ "dynamicRegistration": true
+ },
+ "rename": {
+ "dynamicRegistration": true
+ },
+ "documentLink": {
+ "dynamicRegistration": true
+ },
+ "typeDefinition": {
+ "dynamicRegistration": true
+ },
+ "implementation": {
+ "dynamicRegistration": true
+ },
+ "colorProvider": {
+ "dynamicRegistration": true
+ },
+ "foldingRange": {
+ "dynamicRegistration": true,
+ "rangeLimit": 5000,
+ "lineFoldingOnly": true
+ }
+ }
+ },
+ "trace": "off",
+ "workspaceFolders": [
+ {
+ "uri": "file://.",
+ "name": "folder"
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "initialized",
+ "params": {}
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 7,
+ "method": "textDocument/documentSymbol",
+ "params": {
+ "textDocument": {
+ "uri": "file://../files/hello.vhdl"
+ }
+ }
+ }
+]
diff --git a/testsuite/pyunit/lsp/005create/replies.json b/testsuite/pyunit/lsp/005create/replies.json
new file mode 100644
index 000000000..06027b28a
--- /dev/null
+++ b/testsuite/pyunit/lsp/005create/replies.json
@@ -0,0 +1,31 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "result": {
+ "capabilities": {
+ "textDocumentSync": {
+ "openClose": true,
+ "change": 2,
+ "save": {
+ "includeText": true
+ }
+ },
+ "hoverProvider": false,
+ "definitionProvider": true,
+ "referencesProvider": false,
+ "documentHighlightProvider": false,
+ "documentSymbolProvider": true,
+ "codeActionProvider": false,
+ "documentFormattingProvider": false,
+ "documentRangeFormattingProvider": true,
+ "renameProvider": false
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 7,
+ "result": []
+ }
+]
diff --git a/testsuite/pyunit/lsp/005opterr/cmds.json b/testsuite/pyunit/lsp/005opterr/cmds.json
new file mode 100644
index 000000000..79fd0207d
--- /dev/null
+++ b/testsuite/pyunit/lsp/005opterr/cmds.json
@@ -0,0 +1,260 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "method": "initialize",
+ "params": {
+ "processId": 14698,
+ "rootPath": "/home/tgingold/work/ghdl-language-server/ghdl-ls/tests/005opterr",
+ "rootUri": "file:///home/tgingold/work/ghdl-language-server/ghdl-ls/tests/005opterr",
+ "capabilities": {
+ "workspace": {
+ "applyEdit": true,
+ "workspaceEdit": {
+ "documentChanges": true
+ },
+ "didChangeConfiguration": {
+ "dynamicRegistration": true
+ },
+ "didChangeWatchedFiles": {
+ "dynamicRegistration": true
+ },
+ "symbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ }
+ },
+ "executeCommand": {
+ "dynamicRegistration": true
+ },
+ "configuration": true,
+ "workspaceFolders": true
+ },
+ "textDocument": {
+ "publishDiagnostics": {
+ "relatedInformation": true
+ },
+ "synchronization": {
+ "dynamicRegistration": true,
+ "willSave": true,
+ "willSaveWaitUntil": true,
+ "didSave": true
+ },
+ "completion": {
+ "dynamicRegistration": true,
+ "contextSupport": true,
+ "completionItem": {
+ "snippetSupport": true,
+ "commitCharactersSupport": true,
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ],
+ "deprecatedSupport": true,
+ "preselectSupport": true
+ },
+ "completionItemKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25
+ ]
+ }
+ },
+ "hover": {
+ "dynamicRegistration": true,
+ "contentFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ },
+ "signatureHelp": {
+ "dynamicRegistration": true,
+ "signatureInformation": {
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ }
+ },
+ "definition": {
+ "dynamicRegistration": true
+ },
+ "references": {
+ "dynamicRegistration": true
+ },
+ "documentHighlight": {
+ "dynamicRegistration": true
+ },
+ "documentSymbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ },
+ "hierarchicalDocumentSymbolSupport": true
+ },
+ "codeAction": {
+ "dynamicRegistration": true,
+ "codeActionLiteralSupport": {
+ "codeActionKind": {
+ "valueSet": [
+ "",
+ "quickfix",
+ "refactor",
+ "refactor.extract",
+ "refactor.inline",
+ "refactor.rewrite",
+ "source",
+ "source.organizeImports"
+ ]
+ }
+ }
+ },
+ "codeLens": {
+ "dynamicRegistration": true
+ },
+ "formatting": {
+ "dynamicRegistration": true
+ },
+ "rangeFormatting": {
+ "dynamicRegistration": true
+ },
+ "onTypeFormatting": {
+ "dynamicRegistration": true
+ },
+ "rename": {
+ "dynamicRegistration": true
+ },
+ "documentLink": {
+ "dynamicRegistration": true
+ },
+ "typeDefinition": {
+ "dynamicRegistration": true
+ },
+ "implementation": {
+ "dynamicRegistration": true
+ },
+ "colorProvider": {
+ "dynamicRegistration": true
+ },
+ "foldingRange": {
+ "dynamicRegistration": true,
+ "rangeLimit": 5000,
+ "lineFoldingOnly": true
+ }
+ }
+ },
+ "trace": "off",
+ "workspaceFolders": [
+ {
+ "uri": "file:///home/tgingold/work/ghdl-language-server/ghdl-ls/tests/005opterr",
+ "name": "005opterr"
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "initialized",
+ "params": {}
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/didOpen",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/ghdl-language-server/ghdl-ls/tests/files/heartbeat.vhdl",
+ "languageId": "vhdl",
+ "version": 1,
+ "text": "\nlibrary ieee;\nuse ieee.std_logic_1164.all;\n\nentity heartbeat is\n port ( clk: out std_logic);\nend heartbeat;\n\narchitecture behaviour of heartbeat\nis\n constant clk_period : time := 10 ns;\nbegin\n -- Clock process definition\n clk_process: process\n begin\n clk <= '0';\n wait for clk_period/2;\n clk <= '1';\n wait for clk_period/2;\n end process;\nend behaviour;\n\n"
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 1,
+ "method": "textDocument/documentSymbol",
+ "params": {
+ "textDocument": {
+ "uri": "file:///home/tgingold/work/ghdl-language-server/ghdl-ls/tests/files/heartbeat.vhdl"
+ }
+ }
+ }
+]
diff --git a/testsuite/pyunit/lsp/005opterr/hdl-prj.json b/testsuite/pyunit/lsp/005opterr/hdl-prj.json
new file mode 100644
index 000000000..9d2798bd1
--- /dev/null
+++ b/testsuite/pyunit/lsp/005opterr/hdl-prj.json
@@ -0,0 +1,4 @@
+{ "options": { "ghdl_analysis": [ "--unknown-option" ]},
+ "files": [
+ { "file": "../files/heartbeat.vhdl", "language": "vhdl" }
+]}
diff --git a/testsuite/pyunit/lsp/005opterr/replies.json b/testsuite/pyunit/lsp/005opterr/replies.json
new file mode 100644
index 000000000..e21affc07
--- /dev/null
+++ b/testsuite/pyunit/lsp/005opterr/replies.json
@@ -0,0 +1,116 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "method": "window/showMessage",
+ "params": {
+ "type": 1,
+ "message": "error with option: --unknown-option"
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "result": {
+ "capabilities": {
+ "textDocumentSync": {
+ "openClose": true,
+ "change": 2,
+ "save": {
+ "includeText": true
+ }
+ },
+ "hoverProvider": false,
+ "definitionProvider": true,
+ "referencesProvider": false,
+ "documentHighlightProvider": false,
+ "documentSymbolProvider": true,
+ "codeActionProvider": false,
+ "documentFormattingProvider": false,
+ "documentRangeFormattingProvider": true,
+ "renameProvider": false
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "textDocument/publishDiagnostics",
+ "params": {
+ "uri": "file:///home/tgingold/work/ghdl-language-server/ghdl-ls/tests/files/heartbeat.vhdl",
+ "diagnostics": []
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 1,
+ "result": [
+ {
+ "kind": 2,
+ "name": "heartbeat",
+ "location": {
+ "uri": "file:///home/tgingold/work/ghdl-language-server/ghdl-ls/tests/files/heartbeat.vhdl",
+ "range": {
+ "start": {
+ "line": 4,
+ "character": 0
+ },
+ "end": {
+ "line": 6,
+ "character": 0
+ }
+ }
+ }
+ },
+ {
+ "kind": 2,
+ "name": "behaviour",
+ "location": {
+ "uri": "file:///home/tgingold/work/ghdl-language-server/ghdl-ls/tests/files/heartbeat.vhdl",
+ "range": {
+ "start": {
+ "line": 8,
+ "character": 0
+ },
+ "end": {
+ "line": 20,
+ "character": 0
+ }
+ }
+ }
+ },
+ {
+ "kind": 6,
+ "name": "clk_process",
+ "location": {
+ "uri": "file:///home/tgingold/work/ghdl-language-server/ghdl-ls/tests/files/heartbeat.vhdl",
+ "range": {
+ "start": {
+ "line": 13,
+ "character": 15
+ },
+ "end": {
+ "line": 19,
+ "character": 2
+ }
+ }
+ },
+ "containerName": {
+ "kind": 2,
+ "name": "behaviour",
+ "location": {
+ "uri": "file:///home/tgingold/work/ghdl-language-server/ghdl-ls/tests/files/heartbeat.vhdl",
+ "range": {
+ "start": {
+ "line": 8,
+ "character": 0
+ },
+ "end": {
+ "line": 20,
+ "character": 0
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+]
diff --git a/testsuite/pyunit/lsp/007errprj/cmds.json b/testsuite/pyunit/lsp/007errprj/cmds.json
new file mode 100644
index 000000000..d560fae75
--- /dev/null
+++ b/testsuite/pyunit/lsp/007errprj/cmds.json
@@ -0,0 +1,168 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "method": "initialize",
+ "params": {
+ "processId": 2,
+ "rootPath": ".",
+ "rootUri": "file://.",
+ "capabilities": {
+ "workspace": {
+ "applyEdit": true,
+ "workspaceEdit": {
+ "documentChanges": true
+ },
+ "symbol": {
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ }
+ },
+ "configuration": true,
+ "workspaceFolders": true
+ },
+ "textDocument": {
+ "publishDiagnostics": {
+ "relatedInformation": true
+ },
+ "synchronization": {
+ "dynamicRegistration": true,
+ "willSave": true,
+ "willSaveWaitUntil": true,
+ "didSave": true
+ },
+ "completion": {
+ "dynamicRegistration": true,
+ "contextSupport": true,
+ "completionItem": {
+ "snippetSupport": true,
+ "commitCharactersSupport": true,
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ],
+ "deprecatedSupport": true
+ },
+ "completionItemKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25
+ ]
+ }
+ },
+ "hover": {
+ "dynamicRegistration": true,
+ "contentFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ },
+ "signatureHelp": {
+ "dynamicRegistration": true,
+ "signatureInformation": {
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ }
+ },
+ "documentSymbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ }
+ }
+ }
+ },
+ "trace": "off",
+ "workspaceFolders": [
+ {
+ "uri": "file:///.",
+ "name": "workspacename"
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "initialized",
+ "params": {}
+ }
+]
diff --git a/testsuite/pyunit/lsp/007errprj/hdl-prj.json b/testsuite/pyunit/lsp/007errprj/hdl-prj.json
new file mode 100644
index 000000000..eb675bd13
--- /dev/null
+++ b/testsuite/pyunit/lsp/007errprj/hdl-prj.json
@@ -0,0 +1,3 @@
+{ "files": [
+ "../files/heartbeat.vhdl"
+]}
diff --git a/testsuite/pyunit/lsp/007errprj/replies.json b/testsuite/pyunit/lsp/007errprj/replies.json
new file mode 100644
index 000000000..205c303dc
--- /dev/null
+++ b/testsuite/pyunit/lsp/007errprj/replies.json
@@ -0,0 +1,34 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "method": "window/showMessage",
+ "params": {
+ "type": 1,
+ "message": "error in project file: an element of 'files' is not a dict"
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "result": {
+ "capabilities": {
+ "textDocumentSync": {
+ "openClose": true,
+ "change": 2,
+ "save": {
+ "includeText": true
+ }
+ },
+ "hoverProvider": false,
+ "definitionProvider": true,
+ "referencesProvider": false,
+ "documentHighlightProvider": false,
+ "documentSymbolProvider": true,
+ "codeActionProvider": false,
+ "documentFormattingProvider": false,
+ "documentRangeFormattingProvider": true,
+ "renameProvider": false
+ }
+ }
+ }
+]
diff --git a/testsuite/pyunit/lsp/008errnofile/cmds.json b/testsuite/pyunit/lsp/008errnofile/cmds.json
new file mode 100644
index 000000000..ba9b35a55
--- /dev/null
+++ b/testsuite/pyunit/lsp/008errnofile/cmds.json
@@ -0,0 +1,244 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "method": "initialize",
+ "params": {
+ "processId": 19954,
+ "rootPath": "/home/tgingold/work/ghdl-language-server/ghdl-ls/tests/008errnofile",
+ "rootUri": "file:///home/tgingold/work/ghdl-language-server/ghdl-ls/tests/008errnofile",
+ "capabilities": {
+ "workspace": {
+ "applyEdit": true,
+ "workspaceEdit": {
+ "documentChanges": true
+ },
+ "didChangeConfiguration": {
+ "dynamicRegistration": true
+ },
+ "didChangeWatchedFiles": {
+ "dynamicRegistration": true
+ },
+ "symbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ }
+ },
+ "executeCommand": {
+ "dynamicRegistration": true
+ },
+ "configuration": true,
+ "workspaceFolders": true
+ },
+ "textDocument": {
+ "publishDiagnostics": {
+ "relatedInformation": true
+ },
+ "synchronization": {
+ "dynamicRegistration": true,
+ "willSave": true,
+ "willSaveWaitUntil": true,
+ "didSave": true
+ },
+ "completion": {
+ "dynamicRegistration": true,
+ "contextSupport": true,
+ "completionItem": {
+ "snippetSupport": true,
+ "commitCharactersSupport": true,
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ],
+ "deprecatedSupport": true,
+ "preselectSupport": true
+ },
+ "completionItemKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25
+ ]
+ }
+ },
+ "hover": {
+ "dynamicRegistration": true,
+ "contentFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ },
+ "signatureHelp": {
+ "dynamicRegistration": true,
+ "signatureInformation": {
+ "documentationFormat": [
+ "markdown",
+ "plaintext"
+ ]
+ }
+ },
+ "definition": {
+ "dynamicRegistration": true
+ },
+ "references": {
+ "dynamicRegistration": true
+ },
+ "documentHighlight": {
+ "dynamicRegistration": true
+ },
+ "documentSymbol": {
+ "dynamicRegistration": true,
+ "symbolKind": {
+ "valueSet": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26
+ ]
+ },
+ "hierarchicalDocumentSymbolSupport": true
+ },
+ "codeAction": {
+ "dynamicRegistration": true,
+ "codeActionLiteralSupport": {
+ "codeActionKind": {
+ "valueSet": [
+ "",
+ "quickfix",
+ "refactor",
+ "refactor.extract",
+ "refactor.inline",
+ "refactor.rewrite",
+ "source",
+ "source.organizeImports"
+ ]
+ }
+ }
+ },
+ "codeLens": {
+ "dynamicRegistration": true
+ },
+ "formatting": {
+ "dynamicRegistration": true
+ },
+ "rangeFormatting": {
+ "dynamicRegistration": true
+ },
+ "onTypeFormatting": {
+ "dynamicRegistration": true
+ },
+ "rename": {
+ "dynamicRegistration": true
+ },
+ "documentLink": {
+ "dynamicRegistration": true
+ },
+ "typeDefinition": {
+ "dynamicRegistration": true
+ },
+ "implementation": {
+ "dynamicRegistration": true
+ },
+ "colorProvider": {
+ "dynamicRegistration": true
+ },
+ "foldingRange": {
+ "dynamicRegistration": true,
+ "rangeLimit": 5000,
+ "lineFoldingOnly": true
+ }
+ }
+ },
+ "trace": "off",
+ "workspaceFolders": [
+ {
+ "uri": "file://.",
+ "name": "008errnofile"
+ }
+ ]
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "method": "initialized",
+ "params": {}
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 2,
+ "method": "shutdown",
+ "params": null
+ }
+]
diff --git a/testsuite/pyunit/lsp/008errnofile/hdl-prj.json b/testsuite/pyunit/lsp/008errnofile/hdl-prj.json
new file mode 100644
index 000000000..5bf5bd0fe
--- /dev/null
+++ b/testsuite/pyunit/lsp/008errnofile/hdl-prj.json
@@ -0,0 +1,4 @@
+{
+ "files": [
+ { "file": "nofile.vhdl", "language": "vhdl" }
+]}
diff --git a/testsuite/pyunit/lsp/008errnofile/replies.json b/testsuite/pyunit/lsp/008errnofile/replies.json
new file mode 100644
index 000000000..51fbc3134
--- /dev/null
+++ b/testsuite/pyunit/lsp/008errnofile/replies.json
@@ -0,0 +1,39 @@
+[
+ {
+ "jsonrpc": "2.0",
+ "method": "window/showMessage",
+ "params": {
+ "type": 1,
+ "message": "cannot load nofile.vhdl: No such file or directory"
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 0,
+ "result": {
+ "capabilities": {
+ "textDocumentSync": {
+ "openClose": true,
+ "change": 2,
+ "save": {
+ "includeText": true
+ }
+ },
+ "hoverProvider": false,
+ "definitionProvider": true,
+ "referencesProvider": false,
+ "documentHighlightProvider": false,
+ "documentSymbolProvider": true,
+ "codeActionProvider": false,
+ "documentFormattingProvider": false,
+ "documentRangeFormattingProvider": true,
+ "renameProvider": false
+ }
+ }
+ },
+ {
+ "jsonrpc": "2.0",
+ "id": 2,
+ "result": null
+ }
+]
diff --git a/testsuite/pyunit/lsp/files/adder.vhdl b/testsuite/pyunit/lsp/files/adder.vhdl
new file mode 100644
index 000000000..38ff2a60f
--- /dev/null
+++ b/testsuite/pyunit/lsp/files/adder.vhdl
@@ -0,0 +1,16 @@
+
+entity adder is
+ -- `i0`, `i1`, and the carry-in `ci` are inputs of the adder.
+ -- `s` is the sum output, `co` is the carry-out.
+ port (i0, i1 : in bit; ci : in bit; s : out bit; co : out bit);
+end adder;
+
+architecture rtl of adder is
+begin
+ -- This full-adder architecture contains two concurrent assignments.
+ -- Compute the sum.
+ s <= i0 xor i1 xor ci;
+ -- Compute the carry.
+ co <= (i0 and i1) or (i0 and ci) or (i1 and ci);
+end rtl;
+
diff --git a/testsuite/pyunit/lsp/files/adder_tb.vhdl b/testsuite/pyunit/lsp/files/adder_tb.vhdl
new file mode 100644
index 000000000..7dd9f60b5
--- /dev/null
+++ b/testsuite/pyunit/lsp/files/adder_tb.vhdl
@@ -0,0 +1,60 @@
+
+-- A testbench has no ports.
+entity adder_tb is
+end adder_tb;
+
+architecture behav of adder_tb is
+ -- Declaration of the component that will be instantiated.
+ component adder
+ port (i0, i1 : in bit; ci : in bit; s : out bit; co : out bit);
+ end component;
+
+ -- Specifies which entity is bound with the component.
+ for adder_0: adder use entity work.adder;
+ signal i0, i1, ci, s, co : bit;
+begin
+ -- Component instantiation.
+ adder_0: adder port map (i0 => i0, i1 => i1, ci => ci,
+ s => s, co => co);
+
+ -- This process does the real job.
+ process
+ type pattern_type is record
+ -- The inputs of the adder.
+ i0, i1, ci : bit;
+ -- The expected outputs of the adder.
+ s, co : bit;
+ end record;
+ -- The patterns to apply.
+ type pattern_array is array (natural range <>) of pattern_type;
+ constant patterns : pattern_array :=
+ (('0', '0', '0', '0', '0'),
+ ('0', '0', '1', '1', '0'),
+ ('0', '1', '0', '1', '0'),
+ ('0', '1', '1', '0', '1'),
+ ('1', '0', '0', '1', '0'),
+ ('1', '0', '1', '0', '1'),
+ ('1', '1', '0', '0', '1'),
+ ('1', '1', '1', '1', '1'));
+ begin
+ -- Check each pattern.
+ for i in patterns'range loop
+ -- Set the inputs.
+ i0 <= patterns(i).i0;
+ i1 <= patterns(i).i1;
+ ci <= patterns(i).ci;
+ -- Wait for the results.
+ wait for 1 ns;
+ -- Check the outputs.
+ assert s = patterns(i).s
+ report "bad sum value" severity error;
+ assert co = patterns(i).co
+ report "bad carry out value" severity error;
+ end loop;
+ assert false report "end of test" severity note;
+ -- Wait forever; this will finish the simulation.
+ wait;
+ end process;
+end behav;
+
+
diff --git a/testsuite/pyunit/lsp/files/heartbeat.vhdl b/testsuite/pyunit/lsp/files/heartbeat.vhdl
new file mode 100644
index 000000000..6dfc1a1e1
--- /dev/null
+++ b/testsuite/pyunit/lsp/files/heartbeat.vhdl
@@ -0,0 +1,22 @@
+
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity heartbeat is
+ port ( clk: out std_logic);
+end heartbeat;
+
+architecture behaviour of heartbeat
+is
+ constant clk_period : time := 10 ns;
+begin
+ -- Clock process definition
+ clk_process: process
+ begin
+ clk <= '0';
+ wait for clk_period/2;
+ clk <= '1';
+ wait for clk_period/2;
+ end process;
+end behaviour;
+
diff --git a/testsuite/pyunit/lsp/files/hello.vhdl b/testsuite/pyunit/lsp/files/hello.vhdl
new file mode 100644
index 000000000..f93578b4a
--- /dev/null
+++ b/testsuite/pyunit/lsp/files/hello.vhdl
@@ -0,0 +1,19 @@
+
+-- Hello world program
+use std.textio.all; -- Imports the standard textio package.
+
+-- Defines a design entity, without any ports.
+entity hello_world is
+end hello_world;
+
+architecture behaviour of hello_world is
+begin
+ process
+ variable l : line;
+ begin
+ write (l, String'("Hello world!"));
+ writeline (output, l);
+ wait;
+ end process;
+end behaviour;
+