mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Test "/account add" with missing arg
This commit is contained in:
parent
2197804826
commit
bf0870afe4
@ -120,3 +120,17 @@ void cmd_account_show_shows_message_when_account_exists(void **state)
|
|||||||
|
|
||||||
free(help);
|
free(help);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cmd_account_add_shows_usage_when_no_arg(void **state)
|
||||||
|
{
|
||||||
|
CommandHelp *help = malloc(sizeof(CommandHelp));
|
||||||
|
help->usage = "some usage";
|
||||||
|
gchar *args[] = { "add", NULL };
|
||||||
|
|
||||||
|
expect_string(cons_show, output, "Usage: some usage");
|
||||||
|
|
||||||
|
gboolean result = cmd_account(args, *help);
|
||||||
|
assert_true(result);
|
||||||
|
|
||||||
|
free(help);
|
||||||
|
}
|
||||||
|
@ -4,3 +4,4 @@ void cmd_account_list_shows_accounts(void **state);
|
|||||||
void cmd_account_show_shows_usage_when_no_arg(void **state);
|
void cmd_account_show_shows_usage_when_no_arg(void **state);
|
||||||
void cmd_account_show_shows_message_when_account_does_not_exist(void **state);
|
void cmd_account_show_shows_message_when_account_does_not_exist(void **state);
|
||||||
void cmd_account_show_shows_message_when_account_exists(void **state);
|
void cmd_account_show_shows_message_when_account_exists(void **state);
|
||||||
|
void cmd_account_add_shows_usage_when_no_arg(void **state);
|
||||||
|
@ -34,6 +34,7 @@ int main(int argc, char* argv[]) {
|
|||||||
unit_test(cmd_account_show_shows_usage_when_no_arg),
|
unit_test(cmd_account_show_shows_usage_when_no_arg),
|
||||||
unit_test(cmd_account_show_shows_message_when_account_does_not_exist),
|
unit_test(cmd_account_show_shows_message_when_account_does_not_exist),
|
||||||
unit_test(cmd_account_show_shows_message_when_account_exists),
|
unit_test(cmd_account_show_shows_message_when_account_exists),
|
||||||
|
unit_test(cmd_account_add_shows_usage_when_no_arg),
|
||||||
|
|
||||||
unit_test(cmd_rooms_shows_message_when_disconnected),
|
unit_test(cmd_rooms_shows_message_when_disconnected),
|
||||||
unit_test(cmd_rooms_shows_message_when_disconnecting),
|
unit_test(cmd_rooms_shows_message_when_disconnecting),
|
||||||
|
Loading…
Reference in New Issue
Block a user