From 0fc106dd6a5081d3769668249556766e15c07c71 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 21 Jan 2009 16:10:21 -0600 Subject: Adding in the im-client test and fixing a couple of bugs it found --- tests/Makefile.am | 15 ++++++++++++++- tests/im-client.c | 21 +++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 tests/im-client.c (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 03ec716..0017bca 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,7 +2,8 @@ noinst_PROGRAMS = \ indicate-and-crash \ indicate-alot \ - listen-and-print + listen-and-print \ + im-client indicate_and_crash_SOURCES = \ indicate-and-crash.c @@ -36,3 +37,15 @@ listen_and_print_CFLAGS = \ listen_and_print_LDADD = \ ../libindicate/libindicate.la \ $(LIBINDICATE_LIBS) + +im_client_SOURCES = \ + im-client.c + +im_client_CFLAGS = \ + -I $(srcdir)/.. \ + $(LIBINDICATE_CFLAGS) + +im_client_LDADD = \ + ../libindicate/libindicate.la \ + $(LIBINDICATE_LIBS) + diff --git a/tests/im-client.c b/tests/im-client.c new file mode 100644 index 0000000..cdf3484 --- /dev/null +++ b/tests/im-client.c @@ -0,0 +1,21 @@ + +#include +#include "libindicate/indicator-message.h" + +int +main (int argc, char ** argv) +{ + g_type_init(); + + IndicateIndicatorMessage * indicator; + + indicator = indicate_indicator_message_new(); + indicate_indicator_set_property(INDICATE_INDICATOR(indicator), "subtype", "im"); + indicate_indicator_set_property(INDICATE_INDICATOR(indicator), "sender", "Ted Gould"); + indicate_indicator_set_property(INDICATE_INDICATOR(indicator), "time", "11:11"); + indicate_indicator_show(indicator); + + g_main_loop_run(g_main_loop_new(NULL, FALSE)); + + return 0; +} -- cgit v1.2.3