1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-07-21 18:24:14 -04:00

Add test for case insensitive autocomplete

This commit is contained in:
James Booth 2017-03-25 20:46:31 +00:00
parent 28c862ac53
commit 1b9d033cef
3 changed files with 14 additions and 0 deletions

View File

@ -169,3 +169,15 @@ void complete_both_with_base(void **state)
autocomplete_clear(ac);
}
void complete_ignores_case(void **state)
{
Autocomplete ac = autocomplete_new();
autocomplete_add(ac, "MyBuddy");
char *result = autocomplete_complete(ac, "myb", TRUE);
assert_string_equal("MyBuddy", result);
autocomplete_clear(ac);
}

View File

@ -12,3 +12,4 @@ void complete_accented_with_accented(void **state);
void complete_accented_with_base(void **state);
void complete_both_with_accented(void **state);
void complete_both_with_base(void **state);
void complete_ignores_case(void **state);

View File

@ -94,6 +94,7 @@ int main(int argc, char* argv[]) {
unit_test(complete_accented_with_base),
unit_test(complete_both_with_accented),
unit_test(complete_both_with_base),
unit_test(complete_ignores_case),
unit_test(create_jid_from_null_returns_null),
unit_test(create_jid_from_empty_string_returns_null),