aboutsummaryrefslogtreecommitdiff
path: root/libindicate
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-01-15 15:48:38 -0600
committerTed Gould <ted@canonical.com>2009-01-15 15:48:38 -0600
commitda2657ed395994ec4018633f4f88a32adeed808c (patch)
tree83ac105103dbc1ea7b666d20b4e64546fb06b4b8 /libindicate
parent6ba40259a36abf1b1380921478b68e6dd4e2e8d9 (diff)
downloadlibayatana-indicator-da2657ed395994ec4018633f4f88a32adeed808c.tar.gz
libayatana-indicator-da2657ed395994ec4018633f4f88a32adeed808c.tar.bz2
libayatana-indicator-da2657ed395994ec4018633f4f88a32adeed808c.zip
Adding in a basic listening test
Diffstat (limited to 'libindicate')
-rw-r--r--libindicate/tests/Makefile.am14
-rw-r--r--libindicate/tests/listen-and-print.c16
2 files changed, 29 insertions, 1 deletions
diff --git a/libindicate/tests/Makefile.am b/libindicate/tests/Makefile.am
index 814a50b..208da5b 100644
--- a/libindicate/tests/Makefile.am
+++ b/libindicate/tests/Makefile.am
@@ -1,7 +1,8 @@
noinst_PROGRAMS = \
indicate-and-crash \
- indicate-alot
+ indicate-alot \
+ listen-and-print
indicate_and_crash_SOURCES = \
indicate-and-crash.c
@@ -24,3 +25,14 @@ indicate_alot_CFLAGS = \
indicate_alot_LDADD = \
../libindicate.la \
$(LIBINDICATE_LIBS)
+
+listen_and_print_SOURCES = \
+ listen-and-print.c
+
+listen_and_print_CFLAGS = \
+ -I $(srcdir)/../.. \
+ $(LIBINDICATE_CFLAGS)
+
+listen_and_print_LDADD = \
+ ../libindicate.la \
+ $(LIBINDICATE_LIBS)
diff --git a/libindicate/tests/listen-and-print.c b/libindicate/tests/listen-and-print.c
new file mode 100644
index 0000000..772e4f1
--- /dev/null
+++ b/libindicate/tests/listen-and-print.c
@@ -0,0 +1,16 @@
+
+#include <glib.h>
+#include "libindicate/listener.h"
+
+
+int
+main (int argc, char ** argv)
+{
+ g_type_init();
+
+ IndicateListener * listener = indicate_listener_new();
+
+ g_main_loop_run(g_main_loop_new(NULL, FALSE));
+
+ return 0;
+}