diff --git a/tests/functionaltests/functionaltests.c b/tests/functionaltests/functionaltests.c index e163b0f3..14c5a8b6 100644 --- a/tests/functionaltests/functionaltests.c +++ b/tests/functionaltests/functionaltests.c @@ -120,6 +120,8 @@ main(int argc, char* argv[]) PROF_FUNC_TEST(i18n_msg_nickname), PROF_FUNC_TEST(i18n_win_nickname), + PROF_FUNC_TEST(i18n_autocomplete_tab_utf8), + PROF_FUNC_TEST(i18n_autocomplete_tab_latin), }; return cmocka_run_group_tests(all_tests, NULL, NULL); diff --git a/tests/functionaltests/test_i18n.c b/tests/functionaltests/test_i18n.c index 572486dc..78dccdf3 100644 --- a/tests/functionaltests/test_i18n.c +++ b/tests/functionaltests/test_i18n.c @@ -49,3 +49,42 @@ i18n_win_nickname(void** state) prof_input("/win Σωκράτης"); assert_true(prof_output_regex("socrates@localhost")); } + +void +i18n_autocomplete_tab_utf8(void** state) +{ + prof_connect_with_roster( + ""); + + prof_send_raw("/msg Σω"); + // TAB for completion + prof_send_raw("\t"); + prof_input(" Hello"); + + // If autocompletion worked, we should be in the Socrates window + assert_true(prof_output_regex("socrates@localhost")); + + // And stabber should have received the message + assert_true(stbbr_received( + "" + "Hello" + "")); +} + +void +i18n_autocomplete_tab_latin(void** state) +{ + prof_connect_with_roster( + ""); + + prof_send_raw("/msg Pl"); + prof_send_raw("\t"); + prof_input(" Hello"); + + assert_true(prof_output_regex("plato@localhost")); + + assert_true(stbbr_received( + "" + "Hello" + "")); +} diff --git a/tests/functionaltests/test_i18n.h b/tests/functionaltests/test_i18n.h index c37919cf..cb8ef612 100644 --- a/tests/functionaltests/test_i18n.h +++ b/tests/functionaltests/test_i18n.h @@ -7,3 +7,5 @@ */ void i18n_msg_nickname(void** state); void i18n_win_nickname(void** state); +void i18n_autocomplete_tab_utf8(void** state); +void i18n_autocomplete_tab_latin(void** state);