[clangd] Ignore comments in clangd input, so we can write tests without sed.

Another attempt on making this work on windows.

llvm-svn: 294312
This commit is contained in:
Benjamin Kramer 2017-02-07 15:37:17 +00:00
parent 891239e64f
commit d115a574b5
2 changed files with 7 additions and 2 deletions

View File

@ -56,6 +56,11 @@ int main(int argc, char *argv[]) {
if (LineRef.trim().empty())
continue;
// We allow YAML-style comments. Technically this isn't part of the
// LSP specification, but makes writing tests easier.
if (LineRef.startswith("#"))
continue;
unsigned long long Len = 0;
// FIXME: Content-Type is a specified header, but does nothing.
// Content-Length is a mandatory header. It specifies the length of the

View File

@ -1,5 +1,5 @@
# REQUIRES: shell
# RUN: sed -e '/^#/d' -e 's/\r*$/\r/' %s | clangd | FileCheck %s
# RUN: clangd < %s | FileCheck %s
# It is absolutely vital that this file has CRLF line endings.
#
Content-Length: 125