xref: /llvm-project/clang-tools-extra/clangd/test/input-mirror.test (revision 536a62d00784ffdd897285b9e31152bb22d3893b)
1*536a62d0SIlya Biryukov# RUN: clangd -pretty -sync -input-mirror-file %t < %s
2b804eef0SSam McCall# Note that we have to use '-b' as -input-mirror-file does not have a newline at the end of file.
3b804eef0SSam McCall# RUN: diff -b %t %s
4b804eef0SSam McCall# It is absolutely vital that this file has CRLF line endings.
5b804eef0SSam McCall#
6b804eef0SSam McCallContent-Length: 125
7b804eef0SSam McCall
8b804eef0SSam McCall{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
9b804eef0SSam McCallContent-Length: 172
10b804eef0SSam McCall
11b804eef0SSam McCall{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"int main() {\nint a;\na;\n}\n"}}}
12b804eef0SSam McCallContent-Length: 44
13b804eef0SSam McCall
14b804eef0SSam McCall{"jsonrpc":"2.0","id":3,"method":"shutdown"}
15b804eef0SSam McCallContent-Length: 33
16b804eef0SSam McCall
17b804eef0SSam McCall{"jsonrpc":"2.0","method":"exit"}
18