1
1
mirror of https://github.com/profanity-im/profanity.git synced 2025-02-02 15:08:15 -05: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

@ -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);
}

@ -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);

@ -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),