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"}}
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"void func() {\n}"}}}
6 {"jsonrpc":"2.0","id":1,"method":"textDocument/selectionRange","params":{"textDocument":{"uri":"test:///main.cpp"},"positions":[{"line":1,"character":0}]}}
8 # CHECK-NEXT: "jsonrpc": "2.0",
9 # CHECK-NEXT: "result": [
11 # CHECK-NEXT: "parent": {
12 # CHECK-NEXT: "range": {
13 # CHECK-NEXT: "end": {
14 # CHECK-NEXT: "character": 1,
15 # CHECK-NEXT: "line": 1
17 # CHECK-NEXT: "start": {
18 # CHECK-NEXT: "character": 0,
19 # CHECK-NEXT: "line": 0
23 # CHECK-NEXT: "range": {
24 # CHECK-NEXT: "end": {
25 # CHECK-NEXT: "character": 1,
26 # CHECK-NEXT: "line": 1
28 # CHECK-NEXT: "start": {
29 # CHECK-NEXT: "character": 12,
30 # CHECK-NEXT: "line": 0
37 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
39 {"jsonrpc":"2.0","method":"exit"}