This is an archive of the discontinued LLVM Phabricator instance.

[clangd][tests] Fix handling of EOF in delimited input
ClosedPublic

Authored by jkorous on Apr 18 2018, 5:42 AM.

Details

Reviewers
sammccall
Summary

Request in delimited input ended by EOF shouldn't be an error state.
Comments should be allowed at the end of test files.
Input mirroring should work for the last request in delimited test file.

Diff Detail

Event Timeline

jkorous created this revision.Apr 18 2018, 5:42 AM

Hi Sam, could you please take a look at this minor fix?

sammccall accepted this revision.Apr 19 2018, 4:28 AM

I can't see the bug/change related to "Comments should be allowed at the end of test files." can you elaborate?

clangd/delimited-input-comment-at-the-end.test
8

I'd actually lean towards dropping this test.
It's asserting that a magic string isn't present, and this patch removes the only occurrence of the magic string from the code. I like the drive to test every change, but it's hard to see this one ever failing :-)

(if you need a test with a trailing comment, maybe just throw one on the test from the other patch and call it delimited.test)?

This revision is now accepted and ready to land.Apr 19 2018, 4:28 AM
jkorous updated this revision to Diff 143079.Apr 19 2018, 6:05 AM

Include the correct test.

By "Comments should be allowed at the end of test files." I meant that we shouldn't log it as an exceptional state. Should've worded that better.

I included a wrong test in the patch. I had realized the same thing as you and had written another test but messed up.

jkorous closed this revision.Apr 23 2018, 9:03 AM

I forgot to mention review in commit message.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@330608 91177308-0d34-0410-b5e6-96231b3b80d8