1 # Create a fake resource_dir so that the test can find the headers.
3 # RUN: mkdir -p %t/include/ && touch %t/include/foo.h
4 # RUN: clangd -lit-test -resource-dir=%t < %s | FileCheck -strict-whitespace %s
5 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
7 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"#include <foo.h>"}}}
9 {"jsonrpc":"2.0","id":2,"method":"textDocument/documentLink","params":{"textDocument":{"uri":"test:///main.cpp"}}}
11 # CHECK-NEXT: "jsonrpc": "2.0",
12 # CHECK-NEXT: "result": [
14 # CHECK-NEXT: "range": {
15 # CHECK-NEXT: "end": {
16 # CHECK-NEXT: "character": 16,
17 # CHECK-NEXT: "line": 0
19 # CHECK-NEXT: "start": {
20 # CHECK-NEXT: "character": 9,
21 # CHECK-NEXT: "line": 0
24 # CHECK-NEXT: "target": "file://{{.*}}/foo.h"
30 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
32 {"jsonrpc":"2.0","method":"exit"}