about summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-02-14 22:28:55 +0000
committerJames Booth <boothj5@gmail.com>2016-02-14 22:28:55 +0000
commit41fe8c22b1f8c1cf666d42052cd73d59e40a2ed2 (patch)
tree3b53c1fbc2e5dc8c6daccf7fe7bb9f27d1c9d05a /tests
parentf887a35c0cd550a3c635630da2bd83bb7400b957 (diff)
downloadprofani-tty-41fe8c22b1f8c1cf666d42052cd73d59e40a2ed2.tar.gz
Added C plugin code from plugins branch
Diffstat (limited to 'tests')
-rw-r--r--tests/functionaltests/functionaltests.c2
-rw-r--r--tests/unittests/test_cmd_account.c2
-rw-r--r--tests/unittests/test_cmd_otr.c6
-rw-r--r--tests/unittests/test_cmd_otr.h4
-rw-r--r--tests/unittests/test_cmd_pgp.c4
-rw-r--r--tests/unittests/test_cmd_pgp.h4
-rw-r--r--tests/unittests/ui/stub_ui.c19
-rw-r--r--tests/unittests/unittests.c9
8 files changed, 29 insertions, 21 deletions
diff --git a/tests/functionaltests/functionaltests.c b/tests/functionaltests/functionaltests.c
index 878561dc..cd11fcd8 100644
--- a/tests/functionaltests/functionaltests.c
+++ b/tests/functionaltests/functionaltests.c
@@ -7,7 +7,7 @@
 #include <cmocka.h>
 #include <sys/stat.h>
 
-#include "config.h"
+#include "prof_config.h"
 
 #include "proftest.h"
 #include "test_connect.h"
diff --git a/tests/unittests/test_cmd_account.c b/tests/unittests/test_cmd_account.c
index 4b49867f..6eecaac9 100644
--- a/tests/unittests/test_cmd_account.c
+++ b/tests/unittests/test_cmd_account.c
@@ -798,7 +798,7 @@ void cmd_account_set_priority_updates_presence_when_account_connected_with_prese
 
     will_return(jabber_get_account_name, "a_account");
 
-#ifdef HAVE_LIBGPGME
+#ifdef PROF_HAVE_LIBGPGME
     ProfAccount *account = account_new("a_account", "a_jid", NULL, NULL, TRUE, NULL, 5222, "a_resource",
         NULL, NULL, 10, 10, 10, 10, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
diff --git a/tests/unittests/test_cmd_otr.c b/tests/unittests/test_cmd_otr.c
index fdadcb0e..fbfa6cb2 100644
--- a/tests/unittests/test_cmd_otr.c
+++ b/tests/unittests/test_cmd_otr.c
@@ -6,9 +6,9 @@
 #include <string.h>
 #include <glib.h>
 
-#include "config.h"
+#include "prof_config.h"
 
-#ifdef HAVE_LIBOTR
+#ifdef PROF_HAVE_LIBOTR
 #include <libotr/proto.h>
 #include "otr/otr.h"
 #endif
@@ -24,7 +24,7 @@
 
 #define CMD_OTR "/otr"
 
-#ifdef HAVE_LIBOTR
+#ifdef PROF_HAVE_LIBOTR
 void cmd_otr_shows_usage_when_no_args(void **state)
 {
     gchar *args[] = { NULL };
diff --git a/tests/unittests/test_cmd_otr.h b/tests/unittests/test_cmd_otr.h
index 469d7c54..06367041 100644
--- a/tests/unittests/test_cmd_otr.h
+++ b/tests/unittests/test_cmd_otr.h
@@ -1,6 +1,6 @@
-#include "config.h"
+#include "prof_config.h"
 
-#ifdef HAVE_LIBOTR
+#ifdef PROF_HAVE_LIBOTR
 void cmd_otr_shows_usage_when_no_args(void **state);
 void cmd_otr_shows_usage_when_invalid_subcommand(void **state);
 void cmd_otr_log_shows_usage_when_no_args(void **state);
diff --git a/tests/unittests/test_cmd_pgp.c b/tests/unittests/test_cmd_pgp.c
index b1d0ab52..79d617ae 100644
--- a/tests/unittests/test_cmd_pgp.c
+++ b/tests/unittests/test_cmd_pgp.c
@@ -6,7 +6,7 @@
 #include <string.h>
 #include <glib.h>
 
-#include "config.h"
+#include "prof_config.h"
 
 #include "command/commands.h"
 
@@ -14,7 +14,7 @@
 
 #define CMD_PGP "/pgp"
 
-#ifdef HAVE_LIBGPGME
+#ifdef PROF_HAVE_LIBGPGME
 void cmd_pgp_shows_usage_when_no_args(void **state)
 {
     gchar *args[] = { NULL };
diff --git a/tests/unittests/test_cmd_pgp.h b/tests/unittests/test_cmd_pgp.h
index fcb24500..e6f38192 100644
--- a/tests/unittests/test_cmd_pgp.h
+++ b/tests/unittests/test_cmd_pgp.h
@@ -1,6 +1,6 @@
-#include "config.h"
+#include "prof_config.h"
 
-#ifdef HAVE_LIBGPGME
+#ifdef PROF_HAVE_LIBGPGME
 void cmd_pgp_shows_usage_when_no_args(void **state);
 void cmd_pgp_start_shows_message_when_disconnected(void **state);
 void cmd_pgp_start_shows_message_when_disconnecting(void **state);
diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c
index 79c9a6cf..3381c2c6 100644
--- a/tests/unittests/ui/stub_ui.c
+++ b/tests/unittests/ui/stub_ui.c
@@ -1,4 +1,4 @@
-#include "config.h"
+#include "prof_config.h"
 
 #include <glib.h>
 #include <wchar.h>
@@ -8,7 +8,7 @@
 
 #include "ui/window.h"
 #include "ui/ui.h"
-#ifdef HAVE_LIBOTR
+#ifdef PROF_HAVE_LIBOTR
 #include "otr/otr.h"
 #endif
 
@@ -67,7 +67,7 @@ void ui_resize(void) {}
 
 void ui_focus_win(ProfWin *win) {}
 
-#ifdef HAVE_LIBOTR
+#ifdef PROF_HAVE_LIBOTR
 void chatwin_otr_secured(ProfChatWin *chatwin, gboolean trusted) {}
 void chatwin_otr_unsecured(ProfChatWin *chatwin) {}
 void chatwin_otr_trust(ProfChatWin *chatwin) {}
@@ -303,8 +303,10 @@ gboolean ui_win_has_unsaved_form(int num)
     return FALSE;
 }
 
-void
-ui_write(char *line, int offset) {}
+void ui_status_bar_inactive(const int win) {}
+void ui_status_bar_active(const int win) {}
+void ui_status_bar_new(const int win) {}
+void ui_write(char *line, int offset) {}
 
 // console window actions
 
@@ -494,6 +496,10 @@ ProfWin* win_create_private(const char * const fulljid)
 {
     return NULL;
 }
+ProfWin* win_create_plugin(const char * const tag)
+{
+    return NULL;
+}
 
 void win_update_virtual(ProfWin *window) {}
 void win_free(ProfWin *window) {}
@@ -540,3 +546,6 @@ void notify_remind(void) {}
 void notify_invite(const char * const from, const char * const room,
     const char * const reason) {}
 void notify_subscription(const char * const from) {}
+void notify(const char * const message, int timeout,
+    const char * const category) {}
+
diff --git a/tests/unittests/unittests.c b/tests/unittests/unittests.c
index c9c1a662..61143ce0 100644
--- a/tests/unittests/unittests.c
+++ b/tests/unittests/unittests.c
@@ -7,9 +7,8 @@
 #include <cmocka.h>
 #include <sys/stat.h>
 
-#include "config.h"
+#include "prof_config.h"
 #include "chat_session.h"
-
 #include "helpers.h"
 #include "test_autocomplete.h"
 #include "test_chat_session.h"
@@ -356,7 +355,7 @@ int main(int argc, char* argv[]) {
         unit_test(cmd_account_set_eval_password_when_password_set),
         unit_test(cmd_account_set_muc_sets_muc),
         unit_test(cmd_account_set_nick_sets_nick),
-#ifdef HAVE_LIBOTR
+#ifdef PROF_HAVE_LIBOTR
         unit_test(cmd_account_show_message_for_missing_otr_policy),
         unit_test(cmd_account_show_message_for_invalid_otr_policy),
         unit_test(cmd_account_set_otr_sets_otr),
@@ -505,7 +504,7 @@ int main(int argc, char* argv[]) {
         unit_test(cmd_bookmark_remove_removes_bookmark),
         unit_test(cmd_bookmark_remove_shows_message_when_no_bookmark),
 
-#ifdef HAVE_LIBOTR
+#ifdef PROF_HAVE_LIBOTR
         unit_test(cmd_otr_shows_usage_when_no_args),
         unit_test(cmd_otr_shows_usage_when_invalid_subcommand),
         unit_test(cmd_otr_log_shows_usage_when_no_args),
@@ -557,7 +556,7 @@ int main(int argc, char* argv[]) {
         unit_test(cmd_otr_shows_message_when_otr_unsupported),
 #endif
 
-#ifdef HAVE_LIBGPGME
+#ifdef PROF_HAVE_LIBGPGME
         unit_test(cmd_pgp_shows_usage_when_no_args),
         unit_test(cmd_pgp_start_shows_message_when_disconnected),
         unit_test(cmd_pgp_start_shows_message_when_disconnecting),