mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 18:56:21 +00:00
@@ -52,6 +52,7 @@ int main(int argc, char* argv[]) {
|
||||
PROF_FUNC_TEST(presence_chat_with_message),
|
||||
PROF_FUNC_TEST(presence_set_priority),
|
||||
PROF_FUNC_TEST(presence_includes_priority),
|
||||
PROF_FUNC_TEST(presence_keeps_status),
|
||||
PROF_FUNC_TEST(presence_received),
|
||||
PROF_FUNC_TEST(presence_missing_resource_defaults),
|
||||
|
||||
|
||||
@@ -227,6 +227,33 @@ presence_includes_priority(void **state)
|
||||
assert_true(prof_output_exact("Status set to chat (priority 25), \"Free to talk\"."));
|
||||
}
|
||||
|
||||
void
|
||||
presence_keeps_status(void **state)
|
||||
{
|
||||
prof_connect();
|
||||
|
||||
prof_input("/chat \"Free to talk\"");
|
||||
assert_true(stbbr_received(
|
||||
"<presence id='prof_presence_4'>"
|
||||
"<show>chat</show>"
|
||||
"<status>Free to talk</status>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
|
||||
"</presence>"
|
||||
));
|
||||
assert_true(prof_output_exact("Status set to chat (priority 0), \"Free to talk\"."));
|
||||
|
||||
prof_input("/priority 25");
|
||||
assert_true(stbbr_received(
|
||||
"<presence id='prof_presence_5'>"
|
||||
"<show>chat</show>"
|
||||
"<status>Free to talk</status>"
|
||||
"<priority>25</priority>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>"
|
||||
"</presence>"
|
||||
));
|
||||
assert_true(prof_output_exact("Priority set to 25."));
|
||||
}
|
||||
|
||||
void
|
||||
presence_received(void **state)
|
||||
{
|
||||
|
||||
@@ -10,5 +10,6 @@ void presence_chat(void **state);
|
||||
void presence_chat_with_message(void **state);
|
||||
void presence_set_priority(void **state);
|
||||
void presence_includes_priority(void **state);
|
||||
void presence_keeps_status(void **state);
|
||||
void presence_received(void **state);
|
||||
void presence_missing_resource_defaults(void **state);
|
||||
|
||||
Reference in New Issue
Block a user