1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Added connection status tests for /otr myfp

This commit is contained in:
James Booth 2014-02-16 20:15:10 +00:00
parent 880d5c6263
commit 6e58d95469
3 changed files with 36 additions and 0 deletions

View File

@ -341,6 +341,32 @@ void cmd_otr_gen_generates_key_for_connected_account(void **state)
free(help); free(help);
} }
void cmd_otr_myfp_shows_message_when_disconnected(void **state)
{
test_with_command_and_connection_status("myfp", JABBER_DISCONNECTED);
}
void cmd_otr_myfp_shows_message_when_undefined(void **state)
{
test_with_command_and_connection_status("myfp", JABBER_UNDEFINED);
}
void cmd_otr_myfp_shows_message_when_started(void **state)
{
test_with_command_and_connection_status("myfp", JABBER_STARTED);
}
void cmd_otr_myfp_shows_message_when_connecting(void **state)
{
test_with_command_and_connection_status("myfp", JABBER_CONNECTING);
}
void cmd_otr_myfp_shows_message_when_disconnecting(void **state)
{
test_with_command_and_connection_status("myfp", JABBER_DISCONNECTING);
}
#else #else
void cmd_otr_shows_message_when_otr_unsupported(void **state) void cmd_otr_shows_message_when_otr_unsupported(void **state)
{ {

View File

@ -22,6 +22,11 @@ void cmd_otr_gen_shows_message_when_undefined(void **state);
void cmd_otr_gen_shows_message_when_started(void **state); void cmd_otr_gen_shows_message_when_started(void **state);
void cmd_otr_gen_shows_message_when_connecting(void **state); void cmd_otr_gen_shows_message_when_connecting(void **state);
void cmd_otr_gen_shows_message_when_disconnecting(void **state); void cmd_otr_gen_shows_message_when_disconnecting(void **state);
void cmd_otr_myfp_shows_message_when_disconnected(void **state);
void cmd_otr_myfp_shows_message_when_undefined(void **state);
void cmd_otr_myfp_shows_message_when_started(void **state);
void cmd_otr_myfp_shows_message_when_connecting(void **state);
void cmd_otr_myfp_shows_message_when_disconnecting(void **state);
#else #else
void cmd_otr_shows_message_when_otr_unsupported(void **state); void cmd_otr_shows_message_when_otr_unsupported(void **state);
#endif #endif

View File

@ -463,6 +463,11 @@ int main(int argc, char* argv[]) {
unit_test(cmd_otr_gen_shows_message_when_started), unit_test(cmd_otr_gen_shows_message_when_started),
unit_test(cmd_otr_gen_shows_message_when_connecting), unit_test(cmd_otr_gen_shows_message_when_connecting),
unit_test(cmd_otr_gen_shows_message_when_disconnecting), unit_test(cmd_otr_gen_shows_message_when_disconnecting),
unit_test(cmd_otr_myfp_shows_message_when_disconnected),
unit_test(cmd_otr_myfp_shows_message_when_undefined),
unit_test(cmd_otr_myfp_shows_message_when_started),
unit_test(cmd_otr_myfp_shows_message_when_connecting),
unit_test(cmd_otr_myfp_shows_message_when_disconnecting),
#else #else
unit_test(cmd_otr_shows_message_when_otr_unsupported), unit_test(cmd_otr_shows_message_when_otr_unsupported),
#endif #endif