Added chat message functional tests

This commit is contained in:
James Booth
2015-12-22 00:27:37 +00:00
parent 4b26dc5b5a
commit 6303e0e25a
3 changed files with 85 additions and 66 deletions

View File

@@ -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(
"<message id=\"message1\" to=\"stabber@localhost\" from=\"someuser@chatserv.org/laptop\" type=\"chat\">"
"<body>How are you?</body>"
"</message>"
);
assert_true(prof_output_regex("someuser@chatserv.org/laptop: .+How are you?"));
}