diff options
author | Stephen Kelly <steveire@gmail.com> | 2018-10-01 20:45:44 +0000 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2018-10-01 20:45:44 +0000 |
commit | a54982bd48aace7110b67d3b5c798834d2e0044d (patch) | |
tree | fa0ecd5605a8f15ec7119ef71c3fb70940d1c128 | |
parent | 5f54595e91723be117dd263c8800b7ac8869889c (diff) |
[clang-query] Test non-code-completion on single letter shortcuts
-rw-r--r-- | clang-tools-extra/unittests/clang-query/QueryParserTest.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang-tools-extra/unittests/clang-query/QueryParserTest.cpp b/clang-tools-extra/unittests/clang-query/QueryParserTest.cpp index c814a3d16fc..d6153a86479 100644 --- a/clang-tools-extra/unittests/clang-query/QueryParserTest.cpp +++ b/clang-tools-extra/unittests/clang-query/QueryParserTest.cpp @@ -170,4 +170,14 @@ TEST_F(QueryParserTest, Complete) { EXPECT_EQ("Stmt(", Comps[0].TypedText); EXPECT_EQ("Matcher<Stmt> whileStmt(Matcher<WhileStmt>...)", Comps[0].DisplayText); + + Comps = QueryParser::complete("m", 1, QS); + ASSERT_EQ(1u, Comps.size()); + EXPECT_EQ("atch ", Comps[0].TypedText); + EXPECT_EQ("match", Comps[0].DisplayText); + + Comps = QueryParser::complete("l", 1, QS); + ASSERT_EQ(1u, Comps.size()); + EXPECT_EQ("et ", Comps[0].TypedText); + EXPECT_EQ("let", Comps[0].DisplayText); } |