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":"int x; int y = x;"}}} 5--- 6{"jsonrpc":"2.0","id":1,"method":"textDocument/references","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":0,"character":4}}} 7# CHECK: "id": 1 8# CHECK-NEXT: "jsonrpc": "2.0", 9# CHECK-NEXT: "result": [ 10# CHECK-NEXT: { 11# CHECK-NEXT: "range": { 12# CHECK-NEXT: "end": { 13# CHECK-NEXT: "character": 5, 14# CHECK-NEXT: "line": 0 15# CHECK-NEXT: }, 16# CHECK-NEXT: "start": { 17# CHECK-NEXT: "character": 4, 18# CHECK-NEXT: "line": 0 19# CHECK-NEXT: } 20# CHECK-NEXT: }, 21# CHECK-NEXT: "uri": "{{.*}}/main.cpp" 22# CHECK-NEXT: }, 23# CHECK-NEXT: { 24# CHECK-NEXT: "range": { 25# CHECK-NEXT: "end": { 26# CHECK-NEXT: "character": 16, 27# CHECK-NEXT: "line": 0 28# CHECK-NEXT: }, 29# CHECK-NEXT: "start": { 30# CHECK-NEXT: "character": 15, 31# CHECK-NEXT: "line": 0 32# CHECK-NEXT: } 33# CHECK-NEXT: }, 34# CHECK-NEXT: "uri": "{{.*}}/main.cpp" 35# CHECK-NEXT: } 36# CHECK-NEXT: ] 37--- 38{"jsonrpc":"2.0","id":3,"method":"shutdown"} 39--- 40{"jsonrpc":"2.0","method":"exit"} 41