[clang-tools-extra] Fix a link in ReleaseNotes.rst
[llvm-project.git] / clang-tools-extra / clangd / test / selection-range.test
blobe7ff14a678f723afd99e87c6530b9a647b03c273
1 # RUN: clangd -lit-test < %s | FileCheck -strict-whitespace %s
2 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
3 ---
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"void func() {\n}"}}}
5 ---
6 {"jsonrpc":"2.0","id":1,"method":"textDocument/selectionRange","params":{"textDocument":{"uri":"test:///main.cpp"},"positions":[{"line":1,"character":0}]}}
7 #      CHECK:  "id": 1
8 # CHECK-NEXT:  "jsonrpc": "2.0",
9 # CHECK-NEXT:  "result": [
10 # CHECK-NEXT:    {
11 # CHECK-NEXT:      "parent": {
12 # CHECK-NEXT:        "range": {
13 # CHECK-NEXT:          "end": {
14 # CHECK-NEXT:            "character": 1,
15 # CHECK-NEXT:            "line": 1
16 # CHECK-NEXT:          },
17 # CHECK-NEXT:          "start": {
18 # CHECK-NEXT:            "character": 0,
19 # CHECK-NEXT:            "line": 0
20 # CHECK-NEXT:          }
21 # CHECK-NEXT:        }
22 # CHECK-NEXT:      },
23 # CHECK-NEXT:      "range": {
24 # CHECK-NEXT:        "end": {
25 # CHECK-NEXT:          "character": 1,
26 # CHECK-NEXT:          "line": 1
27 # CHECK-NEXT:        },
28 # CHECK-NEXT:        "start": {
29 # CHECK-NEXT:          "character": 12,
30 # CHECK-NEXT:          "line": 0
31 # CHECK-NEXT:        }
32 # CHECK-NEXT:      }
33 # CHECK-NEXT:    }
34 # CHECK-NEXT:  ]
35 # CHECK-NEXT:}
36 ---
37 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
38 ---
39 {"jsonrpc":"2.0","method":"exit"}