[Xfce4-commits] r26817 - in xfconf/trunk/tests: . get-properties has-properties property-changed-signal remove-properties set-properties

Stephan Arts stephan at xfce.org
Fri Apr 11 00:19:14 CEST 2008


Author: stephan
Date: 2008-04-10 22:19:14 +0000 (Thu, 10 Apr 2008)
New Revision: 26817

Added:
   xfconf/trunk/tests/get-properties/
   xfconf/trunk/tests/get-properties/Makefile.am
   xfconf/trunk/tests/get-properties/t-get-arrayv.c
   xfconf/trunk/tests/get-properties/t-get-boolean.c
   xfconf/trunk/tests/get-properties/t-get-double.c
   xfconf/trunk/tests/get-properties/t-get-int.c
   xfconf/trunk/tests/get-properties/t-get-string.c
   xfconf/trunk/tests/get-properties/t-get-stringlist.c
   xfconf/trunk/tests/get-properties/t-get-uint64.c
   xfconf/trunk/tests/get-properties/test-template.sh.in
   xfconf/trunk/tests/has-properties/
   xfconf/trunk/tests/has-properties/Makefile.am
   xfconf/trunk/tests/has-properties/t-has-arrayv.c
   xfconf/trunk/tests/has-properties/t-has-boolean.c
   xfconf/trunk/tests/has-properties/t-has-double.c
   xfconf/trunk/tests/has-properties/t-has-int.c
   xfconf/trunk/tests/has-properties/t-has-string.c
   xfconf/trunk/tests/has-properties/t-has-stringlist.c
   xfconf/trunk/tests/has-properties/t-has-uint64.c
   xfconf/trunk/tests/has-properties/test-template.sh.in
   xfconf/trunk/tests/property-changed-signal/
   xfconf/trunk/tests/property-changed-signal/Makefile.am
   xfconf/trunk/tests/property-changed-signal/t-string-changed-signal.c
   xfconf/trunk/tests/property-changed-signal/test-template.sh.in
   xfconf/trunk/tests/remove-properties/
   xfconf/trunk/tests/remove-properties/Makefile.am
   xfconf/trunk/tests/remove-properties/t-remove-arrayv.c
   xfconf/trunk/tests/remove-properties/t-remove-boolean.c
   xfconf/trunk/tests/remove-properties/t-remove-double.c
   xfconf/trunk/tests/remove-properties/t-remove-int.c
   xfconf/trunk/tests/remove-properties/t-remove-string.c
   xfconf/trunk/tests/remove-properties/t-remove-stringlist.c
   xfconf/trunk/tests/remove-properties/t-remove-uint64.c
   xfconf/trunk/tests/remove-properties/test-template.sh.in
   xfconf/trunk/tests/set-properties/
   xfconf/trunk/tests/set-properties/Makefile.am
   xfconf/trunk/tests/set-properties/t-set-arrayv.c
   xfconf/trunk/tests/set-properties/t-set-boolean.c
   xfconf/trunk/tests/set-properties/t-set-double.c
   xfconf/trunk/tests/set-properties/t-set-int.c
   xfconf/trunk/tests/set-properties/t-set-string.c
   xfconf/trunk/tests/set-properties/t-set-stringlist.c
   xfconf/trunk/tests/set-properties/t-set-uint64.c
   xfconf/trunk/tests/set-properties/test-template.sh.in
Removed:
   xfconf/trunk/tests/t-get-properties.c
   xfconf/trunk/tests/t-has-properties.c
   xfconf/trunk/tests/t-property-changed-signal.c
   xfconf/trunk/tests/t-remove-properties.c
   xfconf/trunk/tests/t-set-properties.c
   xfconf/trunk/tests/test-template.sh.in
Modified:
   xfconf/trunk/tests/Makefile.am
Log:
Organise test-suite a little.


Modified: xfconf/trunk/tests/Makefile.am
===================================================================
--- xfconf/trunk/tests/Makefile.am	2008-04-10 22:06:53 UTC (rev 26816)
+++ xfconf/trunk/tests/Makefile.am	2008-04-10 22:19:14 UTC (rev 26817)
@@ -1,42 +1,14 @@
-test_scripts = \
-	t-set-properties.sh \
-	t-has-properties.sh \
-	t-get-properties.sh \
-	t-remove-properties.sh \
-	t-property-changed-signal.sh
 
-check_PROGRAMS = \
-	t-set-properties \
-	t-has-properties \
-	t-get-properties \
-	t-remove-properties \
-	t-property-changed-signal
+SUBDIRS = \
+	set-properties \
+	property-changed-signal \
+	has-properties \
+	get-properties \
+	remove-properties
 
-check_SCRIPTS = $(test_scripts)
-
-TESTS = $(test_scripts)
-
-AM_CFLAGS = \
-	-DXFCONFD=\"$(top_builddir)/xfconfd/xfconfd\" \
-	-I$(top_srcdir) \
-	$(GLIB_CFLAGS)
-
-LIBS = \
-	$(top_builddir)/xfconf/libxfconf-$(LIBXFCONF_VERSION_API).la
-
-t_set_properties_SOURCES = t-set-properties.c tests-common.h
-t_has_properties_SOURCES = t-has-properties.c tests-common.h
-t_get_properties_SOURCES = t-get-properties.c tests-common.h
-t_remove_properties_SOURCES = t-remove-properties.c tests-common.h
-t_property_changed_signal_SOURCES = t-property-changed-signal.c tests-common.h
-
-%.sh: test-template.sh.in Makefile
-	sed -e 's/@TEST_NAME@/$@/; s/\.sh//;' <$(srcdir)/test-template.sh.in >$@
-	chmod 755 $@
-
 clean-local:
 	-rm -rf test-xdg_config_home
 
 EXTRA_DIST = \
 	$(test_scripts) \
-	test-template.sh.in
+	tests-common.h

Added: xfconf/trunk/tests/get-properties/Makefile.am
===================================================================
--- xfconf/trunk/tests/get-properties/Makefile.am	                        (rev 0)
+++ xfconf/trunk/tests/get-properties/Makefile.am	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,49 @@
+test_scripts = \
+	t-get-string.sh \
+	t-get-int.sh \
+	t-get-uint64.sh \
+	t-get-double.sh \
+	t-get-arrayv.sh \
+	t-get-boolean.sh \
+	t-get-stringlist.sh
+
+check_PROGRAMS = \
+	t-get-string \
+	t-get-int \
+	t-get-uint64 \
+	t-get-double \
+	t-get-arrayv \
+	t-get-boolean \
+	t-get-stringlist
+
+check_SCRIPTS = $(test_scripts)
+
+TESTS = $(test_scripts)
+
+AM_CFLAGS = \
+	-DXFCONFD=\"$(top_builddir)/xfconfd/xfconfd\" \
+	-I$(top_srcdir) \
+	-I$(top_builddir)/tests \
+	$(GLIB_CFLAGS)
+
+LIBS = \
+	$(top_builddir)/xfconf/libxfconf-$(LIBXFCONF_VERSION_API).la
+
+t_get_string_SOURCES = t-get-string.c
+t_get_int_SOURCES = t-get-int.c
+t_get_uint64_SOURCES = t-get-uint64.c
+t_get_double_SOURCES = t-get-double.c
+t_get_arrayv_SOURCES = t-get-arrayv.c
+t_get_boolean_SOURCES = t-get-boolean.c
+t_get_stringlist_SOURCES = t-get-stringlist.c
+
+%.sh: test-template.sh.in Makefile
+	sed -e 's/@TEST_NAME@/$@/; s/\.sh//;' <$(srcdir)/test-template.sh.in >$@
+	chmod 755 $@
+
+clean-local:
+	rm -f t-get-*.sh
+
+EXTRA_DIST = \
+	$(test_scripts) \
+	test-template.sh.in

Added: xfconf/trunk/tests/get-properties/t-get-arrayv.c
===================================================================
--- xfconf/trunk/tests/get-properties/t-get-arrayv.c	                        (rev 0)
+++ xfconf/trunk/tests/get-properties/t-get-arrayv.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,98 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    {
+        GPtrArray *arr = xfconf_channel_get_arrayv(channel, test_array_property);
+        GValue *val;
+        
+        if(!arr) {
+            g_critical("Test failed: returned array is NULL");
+            xfconf_tests_end();
+            return 1;
+        }
+        
+        if(arr->len != 3) {
+            g_critical("Test failed: array len should be %d, is %d", 3, arr->len);
+            xfconf_tests_end();
+            return 1;
+        }
+        
+        val = g_ptr_array_index(arr, 0);
+        if(G_VALUE_TYPE(val) != G_TYPE_BOOLEAN) {
+            g_critical("Test failed: array elem 0 is not G_TYPE_BOOLEAN");
+            xfconf_tests_end();
+            return 1;
+        }
+        if(g_value_get_boolean(val) != TRUE) {
+            g_critical("Test failed: array elem 0 value is not TRUE");
+            xfconf_tests_end();
+            return 1;
+        }
+        
+        val = g_ptr_array_index(arr, 1);
+        if(G_VALUE_TYPE(val) != G_TYPE_INT64) {
+            g_critical("Test failed: array elem 1 is not G_TYPE_INT64");
+            xfconf_tests_end();
+            return 1;
+        }
+        if(g_value_get_int64(val) != 5000000000LL) {
+            g_critical("Test failed: array elem 1 value is not 5000000000");
+            xfconf_tests_end();
+            return 1;
+        }
+        
+        val = g_ptr_array_index(arr, 2);
+        if(G_VALUE_TYPE(val) != G_TYPE_STRING) {
+            g_critical("Test failed: array elem 2 is not G_TYPE_STRING");
+            xfconf_tests_end();
+            return 1;
+        }
+        if(strcmp(g_value_get_string(val), "test string")) {
+            g_critical("Test failed: array elem 2 value should be \"test string\", but it's \"%s\"",
+                       g_value_get_string(val));
+            xfconf_tests_end();
+            return 1;
+        }
+        
+        xfconf_array_free(arr);
+    }
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/get-properties/t-get-boolean.c
===================================================================
--- xfconf/trunk/tests/get-properties/t-get-boolean.c	                        (rev 0)
+++ xfconf/trunk/tests/get-properties/t-get-boolean.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,44 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_get_bool(channel, test_bool_property, FALSE) == test_bool);
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/get-properties/t-get-double.c
===================================================================
--- xfconf/trunk/tests/get-properties/t-get-double.c	                        (rev 0)
+++ xfconf/trunk/tests/get-properties/t-get-double.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,45 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    /* FIXME: will this work everywhere? */
+    TEST_OPERATION(xfconf_channel_get_double(channel, test_double_property, 0.0) == test_double);
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/get-properties/t-get-int.c
===================================================================
--- xfconf/trunk/tests/get-properties/t-get-int.c	                        (rev 0)
+++ xfconf/trunk/tests/get-properties/t-get-int.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,44 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_get_int(channel, test_int_property, -1) == test_int);
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/get-properties/t-get-string.c
===================================================================
--- xfconf/trunk/tests/get-properties/t-get-string.c	                        (rev 0)
+++ xfconf/trunk/tests/get-properties/t-get-string.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,44 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(!strcmp(xfconf_channel_get_string(channel, test_string_property, ""), test_string));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/get-properties/t-get-stringlist.c
===================================================================
--- xfconf/trunk/tests/get-properties/t-get-stringlist.c	                        (rev 0)
+++ xfconf/trunk/tests/get-properties/t-get-stringlist.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,72 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    {
+        gchar **strlist = xfconf_channel_get_string_list(channel,
+                                                         test_strlist_property);
+        gint i;
+        
+        if(!strlist) {
+            g_critical("Test failed: xfconf_channel_get_string_list() returned NULL");
+            xfconf_tests_end();
+            return 1;
+        }
+        
+        for(i = 0; strlist[i] && test_strlist[i]; ++i) {
+            if(strcmp(strlist[i], test_strlist[i])) {
+                g_critical("Test failed: string list values don't match (%s != %s)",
+                           strlist[i], test_strlist[i]);
+                xfconf_tests_end();
+                return 1;
+            }
+        }
+        
+        if(strlist[i] || test_strlist[i]) {
+            g_critical("Test failed: in string list, element %d should be NULL (0x%p, 0x%p)",
+                       i, strlist[i], test_strlist[i]);
+            xfconf_tests_end();
+            return 1;
+        }
+        
+        g_strfreev(strlist);
+    }
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/get-properties/t-get-uint64.c
===================================================================
--- xfconf/trunk/tests/get-properties/t-get-uint64.c	                        (rev 0)
+++ xfconf/trunk/tests/get-properties/t-get-uint64.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,44 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_get_uint64(channel, test_uint64_property, -1) == test_uint64);
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/get-properties/test-template.sh.in
===================================================================
--- xfconf/trunk/tests/get-properties/test-template.sh.in	                        (rev 0)
+++ xfconf/trunk/tests/get-properties/test-template.sh.in	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+eval `dbus-launch --sh-syntax`
+export DBUS_SESSION_BUS_ADDRESS
+export DBUS_SESSION_BUS_PID
+
+export XDG_CONFIG_HOME="../test-xdg_config_home"
+export XDG_CONFIG_DIRS=""
+
+./@TEST_NAME@
+ret=$?
+
+kill -TERM $DBUS_SESSION_BUS_PID
+
+exit $ret

Added: xfconf/trunk/tests/has-properties/Makefile.am
===================================================================
--- xfconf/trunk/tests/has-properties/Makefile.am	                        (rev 0)
+++ xfconf/trunk/tests/has-properties/Makefile.am	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,49 @@
+test_scripts = \
+	t-has-string.sh \
+	t-has-int.sh \
+	t-has-uint64.sh \
+	t-has-double.sh \
+	t-has-arrayv.sh \
+	t-has-boolean.sh \
+	t-has-stringlist.sh
+
+check_PROGRAMS = \
+	t-has-string \
+	t-has-int \
+	t-has-uint64 \
+	t-has-double \
+	t-has-arrayv \
+	t-has-boolean \
+	t-has-stringlist
+
+check_SCRIPTS = $(test_scripts)
+
+TESTS = $(test_scripts)
+
+AM_CFLAGS = \
+	-DXFCONFD=\"$(top_builddir)/xfconfd/xfconfd\" \
+	-I$(top_srcdir) \
+	-I$(top_builddir)/tests \
+	$(GLIB_CFLAGS)
+
+LIBS = \
+	$(top_builddir)/xfconf/libxfconf-$(LIBXFCONF_VERSION_API).la
+
+t_has_string_SOURCES = t-has-string.c
+t_has_int_SOURCES = t-has-string.c
+t_has_uint64_SOURCES = t-has-uint64.c
+t_has_double_SOURCES = t-has-double.c
+t_has_arrayv_SOURCES = t-has-arrayv.c
+t_has_boolean_SOURCES = t-has-boolean.c
+t_has_stringlist_SOURCES = t-has-stringlist.c
+
+%.sh: test-template.sh.in Makefile
+	sed -e 's/@TEST_NAME@/$@/; s/\.sh//;' <$(srcdir)/test-template.sh.in >$@
+	chmod 755 $@
+
+clean-local:
+	rm -f t-has-*.sh
+
+EXTRA_DIST = \
+	$(test_scripts) \
+	test-template.sh.in

Added: xfconf/trunk/tests/has-properties/t-has-arrayv.c
===================================================================
--- xfconf/trunk/tests/has-properties/t-has-arrayv.c	                        (rev 0)
+++ xfconf/trunk/tests/has-properties/t-has-arrayv.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,40 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_has_property(channel, test_array_property));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/has-properties/t-has-boolean.c
===================================================================
--- xfconf/trunk/tests/has-properties/t-has-boolean.c	                        (rev 0)
+++ xfconf/trunk/tests/has-properties/t-has-boolean.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,40 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_has_property(channel, test_bool_property));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/has-properties/t-has-double.c
===================================================================
--- xfconf/trunk/tests/has-properties/t-has-double.c	                        (rev 0)
+++ xfconf/trunk/tests/has-properties/t-has-double.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,40 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_has_property(channel, test_double_property));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/has-properties/t-has-int.c
===================================================================
--- xfconf/trunk/tests/has-properties/t-has-int.c	                        (rev 0)
+++ xfconf/trunk/tests/has-properties/t-has-int.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,40 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_has_property(channel, test_int_property));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/has-properties/t-has-string.c
===================================================================
--- xfconf/trunk/tests/has-properties/t-has-string.c	                        (rev 0)
+++ xfconf/trunk/tests/has-properties/t-has-string.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,40 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_has_property(channel, test_string_property));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/has-properties/t-has-stringlist.c
===================================================================
--- xfconf/trunk/tests/has-properties/t-has-stringlist.c	                        (rev 0)
+++ xfconf/trunk/tests/has-properties/t-has-stringlist.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,40 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_has_property(channel, test_strlist_property));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/has-properties/t-has-uint64.c
===================================================================
--- xfconf/trunk/tests/has-properties/t-has-uint64.c	                        (rev 0)
+++ xfconf/trunk/tests/has-properties/t-has-uint64.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,40 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_has_property(channel, test_uint64_property));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/has-properties/test-template.sh.in
===================================================================
--- xfconf/trunk/tests/has-properties/test-template.sh.in	                        (rev 0)
+++ xfconf/trunk/tests/has-properties/test-template.sh.in	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+eval `dbus-launch --sh-syntax`
+export DBUS_SESSION_BUS_ADDRESS
+export DBUS_SESSION_BUS_PID
+
+export XDG_CONFIG_HOME="../test-xdg_config_home"
+export XDG_CONFIG_DIRS=""
+
+./@TEST_NAME@
+ret=$?
+
+kill -TERM $DBUS_SESSION_BUS_PID
+
+exit $ret

Added: xfconf/trunk/tests/property-changed-signal/Makefile.am
===================================================================
--- xfconf/trunk/tests/property-changed-signal/Makefile.am	                        (rev 0)
+++ xfconf/trunk/tests/property-changed-signal/Makefile.am	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,31 @@
+test_scripts = \
+	t-string-changed-signal.sh
+
+check_PROGRAMS = \
+	t-string-changed-signal
+
+check_SCRIPTS = $(test_scripts)
+
+TESTS = $(test_scripts)
+
+AM_CFLAGS = \
+	-DXFCONFD=\"$(top_builddir)/xfconfd/xfconfd\" \
+	-I$(top_srcdir) \
+	-I$(top_builddir)/tests \
+	$(GLIB_CFLAGS)
+
+LIBS = \
+	$(top_builddir)/xfconf/libxfconf-$(LIBXFCONF_VERSION_API).la
+
+t_string_changed_signal_SOURCES = t-string-changed-signal.c
+
+%.sh: test-template.sh.in Makefile
+	sed -e 's/@TEST_NAME@/$@/; s/\.sh//;' <$(srcdir)/test-template.sh.in >$@
+	chmod 755 $@
+
+clean-local:
+	rm -f t-*-changed-signal.sh
+
+EXTRA_DIST = \
+	$(test_scripts) \
+	test-template.sh.in

Added: xfconf/trunk/tests/property-changed-signal/t-string-changed-signal.c
===================================================================
--- xfconf/trunk/tests/property-changed-signal/t-string-changed-signal.c	                        (rev 0)
+++ xfconf/trunk/tests/property-changed-signal/t-string-changed-signal.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,73 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+typedef struct
+{
+    GMainLoop *mloop;
+    gboolean got_signal;
+} SignalTestData;
+
+static void
+test_signal_changed(XfconfChannel *channel,
+                    const gchar *property,
+                    gpointer user_data)
+{
+    SignalTestData *std = user_data;
+    std->got_signal = TRUE;
+    g_main_loop_quit(std->mloop);
+}
+
+static gboolean
+test_watchdog(gpointer data)
+{
+    SignalTestData *std = data;
+    g_main_loop_quit(std->mloop);
+    return FALSE;
+}
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    SignalTestData std = { NULL, FALSE };
+    
+    std.mloop = g_main_loop_new(NULL, FALSE);
+
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    g_signal_connect(G_OBJECT(channel), "property-changed",
+                     G_CALLBACK(test_signal_changed), &std);
+    
+    TEST_OPERATION(xfconf_channel_set_string(channel, test_string_property, test_string));
+    
+    g_timeout_add(1500, test_watchdog, &std);
+    g_main_loop_run(std.mloop);
+
+    g_main_loop_unref(std.mloop);
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return std.got_signal ? 0 : 1;
+}

Added: xfconf/trunk/tests/property-changed-signal/test-template.sh.in
===================================================================
--- xfconf/trunk/tests/property-changed-signal/test-template.sh.in	                        (rev 0)
+++ xfconf/trunk/tests/property-changed-signal/test-template.sh.in	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+eval `dbus-launch --sh-syntax`
+export DBUS_SESSION_BUS_ADDRESS
+export DBUS_SESSION_BUS_PID
+
+export XDG_CONFIG_HOME="../test-xdg_config_home"
+export XDG_CONFIG_DIRS=""
+
+./@TEST_NAME@
+ret=$?
+
+kill -TERM $DBUS_SESSION_BUS_PID
+
+exit $ret

Added: xfconf/trunk/tests/remove-properties/Makefile.am
===================================================================
--- xfconf/trunk/tests/remove-properties/Makefile.am	                        (rev 0)
+++ xfconf/trunk/tests/remove-properties/Makefile.am	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,49 @@
+test_scripts = \
+	t-remove-string.sh \
+	t-remove-int.sh \
+	t-remove-uint64.sh \
+	t-remove-double.sh \
+	t-remove-arrayv.sh \
+	t-remove-boolean.sh \
+	t-remove-stringlist.sh
+
+check_PROGRAMS = \
+	t-remove-string \
+	t-remove-int \
+	t-remove-uint64 \
+	t-remove-double \
+	t-remove-arrayv \
+	t-remove-boolean \
+	t-remove-stringlist
+
+check_SCRIPTS = $(test_scripts)
+
+TESTS = $(test_scripts)
+
+AM_CFLAGS = \
+	-DXFCONFD=\"$(top_builddir)/xfconfd/xfconfd\" \
+	-I$(top_srcdir) \
+	-I$(top_builddir)/tests \
+	$(GLIB_CFLAGS)
+
+LIBS = \
+	$(top_builddir)/xfconf/libxfconf-$(LIBXFCONF_VERSION_API).la
+
+t_remove_string_SOURCES = t-remove-string.c
+t_remove_int_SOURCES = t-remove-int.c
+t_remove_uint64_SOURCES = t-remove-uint64.c
+t_remove_double_SOURCES = t-remove-double.c
+t_remove_arrayv_SOURCES = t-remove-arrayv.c
+t_remove_boolean_SOURCES = t-remove-boolean.c
+t_remove_stringlist_SOURCES = t-remove-stringlist.c
+
+%.sh: test-template.sh.in Makefile
+	sed -e 's/@TEST_NAME@/$@/; s/\.sh//;' <$(srcdir)/test-template.sh.in >$@
+	chmod 755 $@
+
+clean-local:
+	rm -f t-remove-*.sh
+
+EXTRA_DIST = \
+	$(test_scripts) \
+	test-template.sh.in

Added: xfconf/trunk/tests/remove-properties/t-remove-arrayv.c
===================================================================
--- xfconf/trunk/tests/remove-properties/t-remove-arrayv.c	                        (rev 0)
+++ xfconf/trunk/tests/remove-properties/t-remove-arrayv.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,42 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_has_property(channel, test_array_property));
+    xfconf_channel_remove_property(channel, test_array_property);
+    TEST_OPERATION(!xfconf_channel_has_property(channel, test_array_property));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/remove-properties/t-remove-boolean.c
===================================================================
--- xfconf/trunk/tests/remove-properties/t-remove-boolean.c	                        (rev 0)
+++ xfconf/trunk/tests/remove-properties/t-remove-boolean.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,42 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_has_property(channel, test_bool_property));
+    xfconf_channel_remove_property(channel, test_bool_property);
+    TEST_OPERATION(!xfconf_channel_has_property(channel, test_bool_property));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/remove-properties/t-remove-double.c
===================================================================
--- xfconf/trunk/tests/remove-properties/t-remove-double.c	                        (rev 0)
+++ xfconf/trunk/tests/remove-properties/t-remove-double.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,42 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_has_property(channel, test_double_property));
+    xfconf_channel_remove_property(channel, test_double_property);
+    TEST_OPERATION(!xfconf_channel_has_property(channel, test_double_property));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/remove-properties/t-remove-int.c
===================================================================
--- xfconf/trunk/tests/remove-properties/t-remove-int.c	                        (rev 0)
+++ xfconf/trunk/tests/remove-properties/t-remove-int.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,42 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_has_property(channel, test_int_property));
+    xfconf_channel_remove_property(channel, test_int_property);
+    TEST_OPERATION(!xfconf_channel_has_property(channel, test_int_property));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/remove-properties/t-remove-string.c
===================================================================
--- xfconf/trunk/tests/remove-properties/t-remove-string.c	                        (rev 0)
+++ xfconf/trunk/tests/remove-properties/t-remove-string.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,42 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_has_property(channel, test_string_property));
+    xfconf_channel_remove_property(channel, test_string_property);
+    TEST_OPERATION(!xfconf_channel_has_property(channel, test_string_property));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/remove-properties/t-remove-stringlist.c
===================================================================
--- xfconf/trunk/tests/remove-properties/t-remove-stringlist.c	                        (rev 0)
+++ xfconf/trunk/tests/remove-properties/t-remove-stringlist.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,42 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_has_property(channel, test_strlist_property));
+    xfconf_channel_remove_property(channel, test_strlist_property);
+    TEST_OPERATION(!xfconf_channel_has_property(channel, test_strlist_property));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/remove-properties/t-remove-uint64.c
===================================================================
--- xfconf/trunk/tests/remove-properties/t-remove-uint64.c	                        (rev 0)
+++ xfconf/trunk/tests/remove-properties/t-remove-uint64.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,42 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_has_property(channel, test_uint64_property));
+    xfconf_channel_remove_property(channel, test_uint64_property);
+    TEST_OPERATION(!xfconf_channel_has_property(channel, test_uint64_property));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/remove-properties/test-template.sh.in
===================================================================
--- xfconf/trunk/tests/remove-properties/test-template.sh.in	                        (rev 0)
+++ xfconf/trunk/tests/remove-properties/test-template.sh.in	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+eval `dbus-launch --sh-syntax`
+export DBUS_SESSION_BUS_ADDRESS
+export DBUS_SESSION_BUS_PID
+
+export XDG_CONFIG_HOME="../test-xdg_config_home"
+export XDG_CONFIG_DIRS=""
+
+./@TEST_NAME@
+ret=$?
+
+kill -TERM $DBUS_SESSION_BUS_PID
+
+exit $ret

Added: xfconf/trunk/tests/set-properties/Makefile.am
===================================================================
--- xfconf/trunk/tests/set-properties/Makefile.am	                        (rev 0)
+++ xfconf/trunk/tests/set-properties/Makefile.am	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,49 @@
+test_scripts = \
+	t-set-string.sh \
+	t-set-int.sh \
+	t-set-uint64.sh \
+	t-set-double.sh \
+	t-set-arrayv.sh \
+	t-set-boolean.sh \
+	t-set-stringlist.sh
+
+check_PROGRAMS = \
+	t-set-string \
+	t-set-int \
+	t-set-uint64 \
+	t-set-double \
+	t-set-arrayv \
+	t-set-boolean \
+	t-set-stringlist
+
+check_SCRIPTS = $(test_scripts)
+
+TESTS = $(test_scripts)
+
+AM_CFLAGS = \
+	-DXFCONFD=\"$(top_builddir)/xfconfd/xfconfd\" \
+	-I$(top_srcdir) \
+	-I$(top_builddir)/tests \
+	$(GLIB_CFLAGS)
+
+LIBS = \
+	$(top_builddir)/xfconf/libxfconf-$(LIBXFCONF_VERSION_API).la
+
+t_set_string_SOURCES = t-set-string.c
+t_set_int_SOURCES = t-set-int.c
+t_set_uint64_SOURCES = t-set-uint64.c
+t_set_double_SOURCES = t-set-double.c
+t_set_arrayv_SOURCES = t-set-arrayv.c
+t_set_boolean_SOURCES = t-set-boolean.c
+t_set_stringlist_SOURCES = t-set-stringlist.c
+
+%.sh: test-template.sh.in Makefile
+	sed -e 's/@TEST_NAME@/$@/; s/\.sh//;' <$(srcdir)/test-template.sh.in >$@
+	chmod 755 $@
+
+clean-local:
+	rm -f t-set-*.sh
+
+EXTRA_DIST = \
+	$(test_scripts) \
+	test-template.sh.in

Added: xfconf/trunk/tests/set-properties/t-set-arrayv.c
===================================================================
--- xfconf/trunk/tests/set-properties/t-set-arrayv.c	                        (rev 0)
+++ xfconf/trunk/tests/set-properties/t-set-arrayv.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,63 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    {
+        GPtrArray *arr = g_ptr_array_sized_new(3);
+        GValue *val;
+        
+        val = g_new0(GValue, 1);
+        g_value_init(val, G_TYPE_BOOLEAN);
+        g_value_set_boolean(val, TRUE);
+        g_ptr_array_add(arr, val);
+        
+        val = g_new0(GValue, 1);
+        g_value_init(val, G_TYPE_INT64);
+        g_value_set_int64(val, 5000000000LL);
+        g_ptr_array_add(arr, val);
+        
+        val = g_new0(GValue, 1);
+        g_value_init(val, G_TYPE_STRING);
+        g_value_set_static_string(val, "test string");
+        g_ptr_array_add(arr, val);
+        
+        TEST_OPERATION(xfconf_channel_set_arrayv(channel, test_array_property,
+                                                 arr));
+        
+        xfconf_array_free(arr);
+    }
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/set-properties/t-set-boolean.c
===================================================================
--- xfconf/trunk/tests/set-properties/t-set-boolean.c	                        (rev 0)
+++ xfconf/trunk/tests/set-properties/t-set-boolean.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,40 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_set_bool(channel, test_bool_property, test_bool));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/set-properties/t-set-double.c
===================================================================
--- xfconf/trunk/tests/set-properties/t-set-double.c	                        (rev 0)
+++ xfconf/trunk/tests/set-properties/t-set-double.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,40 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_set_double(channel, test_double_property, test_double));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/set-properties/t-set-int.c
===================================================================
--- xfconf/trunk/tests/set-properties/t-set-int.c	                        (rev 0)
+++ xfconf/trunk/tests/set-properties/t-set-int.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,40 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_set_int(channel, test_int_property, test_int));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/set-properties/t-set-string.c
===================================================================
--- xfconf/trunk/tests/set-properties/t-set-string.c	                        (rev 0)
+++ xfconf/trunk/tests/set-properties/t-set-string.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,40 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_set_string(channel, test_string_property, test_string));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/set-properties/t-set-stringlist.c
===================================================================
--- xfconf/trunk/tests/set-properties/t-set-stringlist.c	                        (rev 0)
+++ xfconf/trunk/tests/set-properties/t-set-stringlist.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,40 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_set_string_list(channel, test_strlist_property, test_strlist));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/set-properties/t-set-uint64.c
===================================================================
--- xfconf/trunk/tests/set-properties/t-set-uint64.c	                        (rev 0)
+++ xfconf/trunk/tests/set-properties/t-set-uint64.c	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,40 @@
+/*
+ *  xfconf
+ *
+ *  Copyright (c) 2007 Brian Tarricone <bjt23 at cornell.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License ONLY.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "tests-common.h"
+
+int
+main(int argc,
+     char **argv)
+{
+    XfconfChannel *channel;
+    
+    if(!xfconf_tests_start())
+        return 1;
+    
+    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
+    
+    TEST_OPERATION(xfconf_channel_set_uint64(channel, test_uint64_property, test_uint64));
+    
+    g_object_unref(G_OBJECT(channel));
+    
+    xfconf_tests_end();
+    
+    return 0;
+}

Added: xfconf/trunk/tests/set-properties/test-template.sh.in
===================================================================
--- xfconf/trunk/tests/set-properties/test-template.sh.in	                        (rev 0)
+++ xfconf/trunk/tests/set-properties/test-template.sh.in	2008-04-10 22:19:14 UTC (rev 26817)
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+eval `dbus-launch --sh-syntax`
+export DBUS_SESSION_BUS_ADDRESS
+export DBUS_SESSION_BUS_PID
+
+export XDG_CONFIG_HOME="../test-xdg_config_home"
+export XDG_CONFIG_DIRS=""
+
+./@TEST_NAME@
+ret=$?
+
+kill -TERM $DBUS_SESSION_BUS_PID
+
+exit $ret

Deleted: xfconf/trunk/tests/t-get-properties.c

Deleted: xfconf/trunk/tests/t-has-properties.c

Deleted: xfconf/trunk/tests/t-property-changed-signal.c

Deleted: xfconf/trunk/tests/t-remove-properties.c

Deleted: xfconf/trunk/tests/t-set-properties.c

Deleted: xfconf/trunk/tests/test-template.sh.in



More information about the Xfce4-commits mailing list