mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
31 lines
627 B
C
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);
|
||
|
}
|