Fix bug in named expression

Summary: Fix stripped named expression keyword case bug

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D670
This commit is contained in:
Mislav Bradac
2017-08-17 14:49:37 +02:00
parent e2a53b82c4
commit 6db9e38e1e
3 changed files with 19 additions and 2 deletions

View File

@@ -299,4 +299,12 @@ TEST(QueryStripper, Parameters) {
UnorderedElementsAre(Pair(2, "$123"), Pair(7, "$pero"),
Pair(12, "$`mirko ``slavko`")));
}
TEST(QueryStripper, KeywordInNamedExpression) {
StrippedQuery stripped("RETURN CoUnT(n)");
EXPECT_EQ(stripped.literals().size(), 0);
EXPECT_EQ(stripped.query(), "return count ( n )");
EXPECT_THAT(stripped.named_expressions(),
UnorderedElementsAre(Pair(2, "CoUnT(n)")));
}
}