pidgin/pidgin

Another sanity check

2017-11-26, Gary Kramlich
8b77fd20fcea
Parents 1e1822eeeb54
Children f451f9216e9d
Another sanity check
--- a/libpurple/tests/test_protocol_xfer.c Sun Nov 26 02:44:11 2017 -0600
+++ b/libpurple/tests/test_protocol_xfer.c Sun Nov 26 02:45:33 2017 -0600
@@ -38,6 +38,7 @@
PurpleProtocol parent;
gboolean can_send;
+ gboolean new_xfer_called;
} TestPurpleProtocolXfer;
typedef struct {
@@ -54,8 +55,11 @@
static PurpleXfer *
test_purple_protocol_xfer_new_xfer(PurpleProtocolXfer *prplxfer, PurpleConnection *c, const gchar *who) {
+ TestPurpleProtocolXfer *test_xfer = (TestPurpleProtocolXfer *)prplxfer;
PurpleAccount *a = purple_connection_get_account(c);
+ test_xfer->new_xfer_called = TRUE;
+
return purple_xfer_new(a, PURPLE_XFER_TYPE_SEND, who);
}
@@ -126,6 +130,7 @@
xfer = purple_protocol_xfer_new_xfer(PURPLE_PROTOCOL_XFER(prplxfer), c, "foo");
g_assert_true(PURPLE_IS_XFER(xfer));
g_assert_cmpstr("foo", ==, purple_xfer_get_remote_user(xfer));
+ g_assert_true(prplxfer->new_xfer_called);
}
/******************************************************************************