diff --git a/tests/functionaltests/functionaltests.c b/tests/functionaltests/functionaltests.c index b194bcf8..3583b135 100644 --- a/tests/functionaltests/functionaltests.c +++ b/tests/functionaltests/functionaltests.c @@ -61,7 +61,8 @@ int main(int argc, char* argv[]) { PROF_FUNC_TEST(presence_missing_resource_defaults), PROF_FUNC_TEST(message_send), - PROF_FUNC_TEST(message_receive), + PROF_FUNC_TEST(message_receive_console), + PROF_FUNC_TEST(message_receive_chatwin), PROF_FUNC_TEST(sends_message_to_barejid_when_contact_offline), PROF_FUNC_TEST(sends_message_to_barejid_when_contact_online), diff --git a/tests/functionaltests/test_message.c b/tests/functionaltests/test_message.c index 15f11089..a46165f1 100644 --- a/tests/functionaltests/test_message.c +++ b/tests/functionaltests/test_message.c @@ -28,7 +28,7 @@ message_send(void **state) } void -message_receive(void **state) +message_receive_console(void **state) { prof_connect(); @@ -40,3 +40,20 @@ message_receive(void **state) assert_true(prof_output_exact("<< chat message: someuser@chatserv.org/laptop (win 2)")); } + +void +message_receive_chatwin(void **state) +{ + prof_connect(); + + prof_input("/msg someuser@chatserv.org"); + prof_output_exact("someuser@chatserv.org"); + + stbbr_send( + "" + "How are you?" + "" + ); + + assert_true(prof_output_regex("someuser@chatserv.org/laptop: .+How are you?")); +} diff --git a/tests/functionaltests/test_message.h b/tests/functionaltests/test_message.h index b8f03a7e..d3a1987c 100644 --- a/tests/functionaltests/test_message.h +++ b/tests/functionaltests/test_message.h @@ -1,2 +1,3 @@ void message_send(void **state); -void message_receive(void **state); +void message_receive_console(void **state); +void message_receive_chatwin(void **state);