1 # RUN: clangd -lit-test < %s | FileCheck -strict-whitespace %s
2 # Verify versions get recorded/inferred, and are reported in publishDiagnostics.
3 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{}}
5 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///foo.c","languageId":"c","text":""}}}
8 {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///foo.c","version":5},"contentChanges":[{"text":"a"}]}}
11 {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///foo.c"},"contentChanges":[{"text":"b"}]}}
14 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///bar.c","version": 42, "languageId":"c","text":""}}}
15 # CHECK: "version": 42
17 {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///bar.c"},"contentChanges":[{"text":"c"}]}}
18 # CHECK: "version": 43
20 {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///bar.c", "version": 123},"contentChanges":[{"text":"d"}]}}
21 # CHECK: "version": 123
23 {"jsonrpc":"2.0","id":6,"method":"shutdown"}
25 {"jsonrpc":"2.0","method":"exit"}