aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-06-28 13:44:43 -0500
committerTed Gould <ted@gould.cx>2010-06-28 13:44:43 -0500
commit1fa54c12337433455d7e9a65779b28d927050896 (patch)
treeada15cd7bd49d29ee60baa5c8ea060ef2d26441a
parent778e00d98087fc00329b1ddd28dd46df4f297d8f (diff)
downloadlibdbusmenu-1fa54c12337433455d7e9a65779b28d927050896.tar.gz
libdbusmenu-1fa54c12337433455d7e9a65779b28d927050896.tar.bz2
libdbusmenu-1fa54c12337433455d7e9a65779b28d927050896.zip
Adding a new testing lib.
-rw-r--r--.bzrignore3
-rw-r--r--configure.ac1
-rw-r--r--tests/Makefile.am34
-rw-r--r--tests/dbusmenu-jsonloader.pc.in14
-rw-r--r--tests/json-loader.c4
-rw-r--r--tests/json-loader.h3
6 files changed, 59 insertions, 0 deletions
diff --git a/.bzrignore b/.bzrignore
index 986e540..1079d9f 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -182,3 +182,6 @@ docs/libdbusmenu-gtk/reference/tmpl/menuitem.sgml
docs/libdbusmenu-gtk/reference/tmpl/menuitem.sgml.bak
gtk-doc.make
m4/gtk-doc.m4
+tests/dbusmenu-jsonloader.pc
+tests/libdbusmenu-jsonloader.la
+tests/libdbusmenu_jsonloader_la-json-loader.lo
diff --git a/configure.ac b/configure.ac
index 80c4b8b..fdc76fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -126,6 +126,7 @@ libdbusmenu-gtk/dbusmenu-gtk.pc
tools/Makefile
tools/testapp/Makefile
tests/Makefile
+tests/dbusmenu-jsonloader.pc
docs/Makefile
docs/libdbusmenu-glib/Makefile
docs/libdbusmenu-glib/reference/Makefile
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 66f286b..18ca628 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -36,6 +36,40 @@ check_PROGRAMS = \
XVFB_RUN=". $(srcdir)/run-xvfb.sh"
######################
+# JSON Loader lib
+######################
+
+lib_LTLIBRARIES = libdbusmenu-jsonloader.la
+
+libdbusmenu_jsonloaderincludedir=$(includedir)/libdbusmenu-0.1/libdbusmenu-jsonloader/
+
+libdbusmenu_jsonloaderinclude_HEADERS = \
+ json-loader.h
+
+libdbusmenu_jsonloader_la_SOURCES = \
+ json-loader.h \
+ json-loader.c
+
+libdbusmenu_jsonloader_la_LDFLAGS = \
+ -version-info $(LIBDBUSMENU_CURRENT):$(LIBDBUSMENU_REVISION):$(LIBDBUSMENU_AGE) \
+ -no-undefined \
+ -export-symbols-regex "^[^_].*"
+
+libdbusmenu_jsonloader_la_CFLAGS = \
+ $(DBUSMENUGLIB_CFLAGS) \
+ -I $(srcdir)/.. \
+ -Wall \
+ -Werror \
+ -DG_DISABLE_DEPRECATED \
+ -DG_LOG_DOMAIN="\"LIBDBUSMENU-JSONLOADER\""
+
+libdbusmenu_jsonloader_la_LIBADD = \
+ $(DBUSMENUGLIB_LIBS)
+
+pkgconfig_DATA = dbusmenu-jsonloader.pc
+pkgconfigdir = $(libdir)/pkgconfig
+
+######################
# Test GLib server
######################
diff --git a/tests/dbusmenu-jsonloader.pc.in b/tests/dbusmenu-jsonloader.pc.in
new file mode 100644
index 0000000..6c48f7e
--- /dev/null
+++ b/tests/dbusmenu-jsonloader.pc.in
@@ -0,0 +1,14 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+bindir=@bindir@
+includedir=@includedir@
+
+Cflags: -I${includedir}/libdbusmenu-0.1
+Requires: dbus-glib-1
+Libs: -L${libdir} -ldbusmenu-jsonloader
+
+Name: libdbusmenu-jsonloader
+Description: A small library to load JSON descriptions of menus. Mostly for testing.
+Version: @VERSION@
+
diff --git a/tests/json-loader.c b/tests/json-loader.c
new file mode 100644
index 0000000..c2483b6
--- /dev/null
+++ b/tests/json-loader.c
@@ -0,0 +1,4 @@
+
+#include "json-loader.h"
+
+const gchar * myval = "FIVE";
diff --git a/tests/json-loader.h b/tests/json-loader.h
new file mode 100644
index 0000000..b776c15
--- /dev/null
+++ b/tests/json-loader.h
@@ -0,0 +1,3 @@
+
+#include <libdbusmenu-glib/menuitem.h>
+