1# for %resource_dir: REQUIRES: clang
2# %resource_dir actually points at builtin_include_dir, go up one directory.
3# RUN: clangd -lit-test -resource-dir=%resource_dir/.. < %s | FileCheck -strict-whitespace %s
4{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
5---
6{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"#include <stdint.h>\n#include <stddef.h>"}}}
7---
8{"jsonrpc":"2.0","id":2,"method":"textDocument/documentLink","params":{"textDocument":{"uri":"test:///main.cpp"}}}
9#      CHECK:  "id": 2,
10# CHECK-NEXT:  "jsonrpc": "2.0",
11# CHECK-NEXT:  "result": [
12# CHECK-NEXT:    {
13# CHECK-NEXT:      "range": {
14# CHECK-NEXT:        "end": {
15# CHECK-NEXT:          "character": 19,
16# CHECK-NEXT:          "line": 0
17# CHECK-NEXT:        },
18# CHECK-NEXT:        "start": {
19# CHECK-NEXT:          "character": 9,
20# CHECK-NEXT:          "line": 0
21# CHECK-NEXT:        }
22# CHECK-NEXT:      },
23# CHECK-NEXT:      "target": "file://{{.*}}/stdint.h"
24# CHECK-NEXT:    },
25# CHECK-NEXT:    {
26# CHECK-NEXT:      "range": {
27# CHECK-NEXT:        "end": {
28# CHECK-NEXT:          "character": 19,
29# CHECK-NEXT:          "line": 1
30# CHECK-NEXT:        },
31# CHECK-NEXT:        "start": {
32# CHECK-NEXT:          "character": 9,
33# CHECK-NEXT:          "line": 1
34# CHECK-NEXT:        }
35# CHECK-NEXT:      },
36# CHECK-NEXT:      "target": "file://{{.*}}/stddef.h"
37# CHECK-NEXT:    }
38# CHECK-NEXT:  ]
39# CHECK-NEXT:}
40
41---
42{"jsonrpc":"2.0","id":3,"method":"shutdown"}
43---
44{"jsonrpc":"2.0","method":"exit"}
45