Files
profanity/tests/test_cmd_bookmark.c
2014-02-01 16:16:56 +00:00

31 lines
627 B
C

#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "xmpp/xmpp.h"
#include "xmpp/mock_xmpp.h"
#include "command/commands.h"
#include "ui/mock_ui.h"
void cmd_bookmark_shows_usage_when_no_args(void **state)
{
mock_cons_show();
CommandHelp *help = malloc(sizeof(CommandHelp));
help->usage = "some usage";
gchar *args[] = { NULL };
mock_connection_status(JABBER_CONNECTED);
expect_cons_show("Usage: some usage");
gboolean result = cmd_bookmark(args, *help);
assert_true(result);
free(help);
}