[clang-tidy][NFC]remove deps of clang in clang tidy test (#116588)
[llvm-project.git] / mlir / test / tblgen-lsp-server / document-links.test
blob1dc0e0c0fa55ede2b3b31b178795cd7f55a7e43b
1 // RUN: tblgen-lsp-server -tablegen-extra-dir %S -tablegen-extra-dir %S/../../include -lit-test < %s | FileCheck %s
2 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"tablegen","capabilities":{},"trace":"off"}}
3 // -----
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{
5   "uri":"test:///foo.td",
6   "languageId":"tablegen",
7   "version":1,
8   "text":"include \"include/included.td\""
9 }}}
10 // -----
11 {"jsonrpc":"2.0","id":1,"method":"textDocument/documentLink","params":{
12   "textDocument":{"uri":"test:///foo.td"}
14 //      CHECK:  "id": 1,
15 // CHECK-NEXT:  "jsonrpc": "2.0",
16 // CHECK-NEXT:  "result": [
17 // CHECK-NEXT:    {
18 // CHECK-NEXT:      "range": {
19 // CHECK-NEXT:        "end": {
20 // CHECK-NEXT:          "character": 29,
21 // CHECK-NEXT:          "line": 0
22 // CHECK-NEXT:        },
23 // CHECK-NEXT:        "start": {
24 // CHECK-NEXT:          "character": 8,
25 // CHECK-NEXT:          "line": 0
26 // CHECK-NEXT:        }
27 // CHECK-NEXT:      },
28 // CHECK-NEXT:      "target": "file:{{.*}}included.td"
29 // CHECK-NEXT:    }
30 // CHECK-NEXT:  ]
31 // -----
32 {"jsonrpc":"2.0","id":7,"method":"shutdown"}
33 // -----
34 {"jsonrpc":"2.0","method":"exit"}