Test for query as prefix of candidate preference
This commit is contained in:
parent
1a08eb9ce0
commit
9019a6f827
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user