forked from OSchip/llvm-project
[clangd] Add a #include completion test that triggers an assertion.
Summary: Test for https://reviews.llvm.org/D52774. Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52775 llvm-svn: 343593
This commit is contained in:
parent
714e971540
commit
1c6b6deb33
|
@ -2093,6 +2093,15 @@ TEST(CompletionTest, IncludedCompletionKinds) {
|
|||
Has("bar.h\"", CompletionItemKind::File)));
|
||||
}
|
||||
|
||||
TEST(CompletionTest, NoCrashAtNonAlphaIncludeHeader) {
|
||||
auto Results = completions(
|
||||
R"cpp(
|
||||
#include "./^"
|
||||
)cpp"
|
||||
);
|
||||
EXPECT_TRUE(Results.Completions.empty());
|
||||
}
|
||||
|
||||
TEST(CompletionTest, NoAllScopesCompletionWhenQualified) {
|
||||
clangd::CodeCompleteOptions Opts = {};
|
||||
Opts.AllScopes = true;
|
||||
|
|
Loading…
Reference in New Issue