mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-26 15:26:22 +00:00
Apply coding style
Regards https://github.com/profanity-im/profanity/issues/1396
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#include <cmocka.h>
|
||||
#include <glib.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <cmocka.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
#define CMD_PGP "/pgp"
|
||||
|
||||
#ifdef HAVE_LIBGPGME
|
||||
void cmd_pgp_shows_usage_when_no_args(void **state)
|
||||
void
|
||||
cmd_pgp_shows_usage_when_no_args(void** state)
|
||||
{
|
||||
gchar *args[] = { NULL };
|
||||
gchar* args[] = { NULL };
|
||||
|
||||
expect_string(cons_bad_cmd_usage, cmd, CMD_PGP);
|
||||
|
||||
@@ -26,9 +27,10 @@ void cmd_pgp_shows_usage_when_no_args(void **state)
|
||||
assert_true(result);
|
||||
}
|
||||
|
||||
void cmd_pgp_start_shows_message_when_connection(jabber_conn_status_t conn_status)
|
||||
void
|
||||
cmd_pgp_start_shows_message_when_connection(jabber_conn_status_t conn_status)
|
||||
{
|
||||
gchar *args[] = { "start", NULL };
|
||||
gchar* args[] = { "start", NULL };
|
||||
ProfWin window;
|
||||
window.type = WIN_CHAT;
|
||||
|
||||
@@ -40,24 +42,28 @@ void cmd_pgp_start_shows_message_when_connection(jabber_conn_status_t conn_statu
|
||||
assert_true(result);
|
||||
}
|
||||
|
||||
void cmd_pgp_start_shows_message_when_disconnected(void **state)
|
||||
void
|
||||
cmd_pgp_start_shows_message_when_disconnected(void** state)
|
||||
{
|
||||
cmd_pgp_start_shows_message_when_connection(JABBER_DISCONNECTED);
|
||||
}
|
||||
|
||||
void cmd_pgp_start_shows_message_when_disconnecting(void **state)
|
||||
void
|
||||
cmd_pgp_start_shows_message_when_disconnecting(void** state)
|
||||
{
|
||||
cmd_pgp_start_shows_message_when_connection(JABBER_DISCONNECTING);
|
||||
}
|
||||
|
||||
void cmd_pgp_start_shows_message_when_connecting(void **state)
|
||||
void
|
||||
cmd_pgp_start_shows_message_when_connecting(void** state)
|
||||
{
|
||||
cmd_pgp_start_shows_message_when_connection(JABBER_CONNECTING);
|
||||
}
|
||||
|
||||
void cmd_pgp_start_shows_message_when_no_arg_in_wintype(win_type_t wintype)
|
||||
void
|
||||
cmd_pgp_start_shows_message_when_no_arg_in_wintype(win_type_t wintype)
|
||||
{
|
||||
gchar *args[] = { "start", NULL };
|
||||
gchar* args[] = { "start", NULL };
|
||||
ProfWin window;
|
||||
window.type = wintype;
|
||||
|
||||
@@ -69,35 +75,41 @@ void cmd_pgp_start_shows_message_when_no_arg_in_wintype(win_type_t wintype)
|
||||
assert_true(result);
|
||||
}
|
||||
|
||||
void cmd_pgp_start_shows_message_when_no_arg_in_console(void **state)
|
||||
void
|
||||
cmd_pgp_start_shows_message_when_no_arg_in_console(void** state)
|
||||
{
|
||||
cmd_pgp_start_shows_message_when_no_arg_in_wintype(WIN_CONSOLE);
|
||||
}
|
||||
|
||||
void cmd_pgp_start_shows_message_when_no_arg_in_muc(void **state)
|
||||
void
|
||||
cmd_pgp_start_shows_message_when_no_arg_in_muc(void** state)
|
||||
{
|
||||
cmd_pgp_start_shows_message_when_no_arg_in_wintype(WIN_MUC);
|
||||
}
|
||||
|
||||
void cmd_pgp_start_shows_message_when_no_arg_in_conf(void **state)
|
||||
void
|
||||
cmd_pgp_start_shows_message_when_no_arg_in_conf(void** state)
|
||||
{
|
||||
cmd_pgp_start_shows_message_when_no_arg_in_wintype(WIN_CONFIG);
|
||||
}
|
||||
|
||||
void cmd_pgp_start_shows_message_when_no_arg_in_private(void **state)
|
||||
void
|
||||
cmd_pgp_start_shows_message_when_no_arg_in_private(void** state)
|
||||
{
|
||||
cmd_pgp_start_shows_message_when_no_arg_in_wintype(WIN_PRIVATE);
|
||||
}
|
||||
|
||||
void cmd_pgp_start_shows_message_when_no_arg_in_xmlconsole(void **state)
|
||||
void
|
||||
cmd_pgp_start_shows_message_when_no_arg_in_xmlconsole(void** state)
|
||||
{
|
||||
cmd_pgp_start_shows_message_when_no_arg_in_wintype(WIN_XML);
|
||||
}
|
||||
|
||||
#else
|
||||
void cmd_pgp_shows_message_when_pgp_unsupported(void **state)
|
||||
void
|
||||
cmd_pgp_shows_message_when_pgp_unsupported(void** state)
|
||||
{
|
||||
gchar *args[] = { "gen", NULL };
|
||||
gchar* args[] = { "gen", NULL };
|
||||
|
||||
expect_cons_show("This version of Profanity has not been built with PGP support enabled");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user