--- a/libpurple/tests/meson.build Thu Sep 07 22:55:20 2017 -0500
+++ b/libpurple/tests/meson.build Tue Sep 12 20:05:35 2017 -0500
@@ -12,6 +12,6 @@
'-DTEST_DATA_DIR="@0@/data"'.format(meson.current_source_dir())
- dependencies : [libpurple_dep, glib])
+ dependencies : [libpurple_dep, glib, dbus, dbus_glib]) --- a/libpurple/tests/test_protocol_xfer.c Thu Sep 07 22:55:20 2017 -0500
+++ b/libpurple/tests/test_protocol_xfer.c Tue Sep 12 20:05:35 2017 -0500
@@ -25,6 +25,15 @@
+#include "dbus-server.h" +/****************************************************************************** + *****************************************************************************/ +} TestPurpleProtocolXferFixture; /******************************************************************************
* PurpleProtcolXfer Implementations
*****************************************************************************/
@@ -74,12 +83,31 @@
/******************************************************************************
+ *****************************************************************************/ +test_purple_protocol_xfer_setup(TestPurpleProtocolXferFixture *fixture, gconstpointer data) { + /* we need to find a way to make this crap not required */ + // purple_core_init("testing"); + purple_dbus_init_ids(); + purple_protocols_init(); + purple_connections_init(); + purple_accounts_init(); +/****************************************************************************** *****************************************************************************/
-test_purple_protocol_xfer_can_receive_func(void) {
+test_purple_protocol_xfer_can_receive_func(TestPurpleProtocolXferFixture *fixture, gconstpointer data) { TestPurpleProtocolXfer *xfer = g_object_new(test_purple_protocol_xfer_get_type(), NULL);
- PurpleConnection *c = g_object_new(PURPLE_TYPE_CONNECTION, NULL);
+ PurpleAccount *a = purple_account_new("testing", "testing"); + PurpleConnection *c = g_object_new(PURPLE_TYPE_CONNECTION, "account", a, NULL); @@ -110,7 +138,14 @@
g_test_set_nonfatal_assertions();
#endif /* GLIB_CHECK_VERSION(2, 38, 0) */
- g_test_add_func("/protocol-xfer/can-receive", test_purple_protocol_xfer_can_receive_func);
+ "/protocol-xfer/can-receive", + TestPurpleProtocolXferFixture, + test_purple_protocol_xfer_setup, + test_purple_protocol_xfer_can_receive_func,