Test for query as prefix of candidate preference

This commit is contained in:
Strahinja Markovic 2012-04-16 21:57:20 -07:00
parent 1a08eb9ce0
commit 9019a6f827

View File

@ -164,6 +164,18 @@ TEST_F( CompleterTest, RatioUtilizationTieBreak )
"FooBarQuxZaa" ) );
}
TEST_F( CompleterTest, QueryPrefixOfCandidateWins )
{
Pylist results;
Completer( Candidates(
"foobar",
"fbaroo" ) ).GetCandidatesForQuery( "foo", results );
EXPECT_THAT( ToStringVector( results ),
ElementsAre( "foobar",
"fbaroo" ) );
}
TEST_F( CompleterTest, ShorterCandidateWins )
{
Pylist results;