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":{
5 "uri":"test:///main.cpp",
8 "text":"int x; int y = x;"
11 {"jsonrpc":"2.0","id":1,"method":"textDocument/references","params":{
12 "textDocument":{"uri":"test:///main.cpp"},
13 "position":{"line":0,"character":4},
14 "context":{"includeDeclaration": false}
17 # CHECK-NEXT: "jsonrpc": "2.0",
18 # CHECK-NEXT: "result": [
20 # CHECK-NEXT: "range": {
21 # CHECK-NEXT: "end": {
22 # CHECK-NEXT: "character": 16,
23 # CHECK-NEXT: "line": 0
25 # CHECK-NEXT: "start": {
26 # CHECK-NEXT: "character": 15,
27 # CHECK-NEXT: "line": 0
30 # CHECK-NEXT: "uri": "{{.*}}/main.cpp"
34 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
36 {"jsonrpc":"2.0","method":"exit"}