aboutsummaryrefslogtreecommitdiffstats
path: root/tests/check-empathy-utils.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2007-12-29 23:49:28 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-12-29 23:49:28 +0800
commit2c4f7c6b6549f8b95845f1838dd0dc710c9e8304 (patch)
tree73f77284e63c07544111aae1cea50f8fced8acf0 /tests/check-empathy-utils.c
parent876e427bafc95f2f13a333b9bca0d8982b7faf3d (diff)
downloadgsoc2013-empathy-2c4f7c6b6549f8b95845f1838dd0dc710c9e8304.tar
gsoc2013-empathy-2c4f7c6b6549f8b95845f1838dd0dc710c9e8304.tar.gz
gsoc2013-empathy-2c4f7c6b6549f8b95845f1838dd0dc710c9e8304.tar.bz2
gsoc2013-empathy-2c4f7c6b6549f8b95845f1838dd0dc710c9e8304.tar.lz
gsoc2013-empathy-2c4f7c6b6549f8b95845f1838dd0dc710c9e8304.tar.xz
gsoc2013-empathy-2c4f7c6b6549f8b95845f1838dd0dc710c9e8304.tar.zst
gsoc2013-empathy-2c4f7c6b6549f8b95845f1838dd0dc710c9e8304.zip
Add "check" framework support. Fixes bug #505622 (Guillaume Desmottes).
svn path=/trunk/; revision=509
Diffstat (limited to 'tests/check-empathy-utils.c')
-rw-r--r--tests/check-empathy-utils.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/check-empathy-utils.c b/tests/check-empathy-utils.c
new file mode 100644
index 000000000..faf261058
--- /dev/null
+++ b/tests/check-empathy-utils.c
@@ -0,0 +1,29 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <check.h>
+#include "check-helpers.h"
+#include "check-libempathy.h"
+
+#include <libempathy/empathy-utils.h>
+
+START_TEST (test_empathy_substring)
+{
+ gchar *tmp;
+
+ tmp = empathy_substring ("empathy", 2, 6);
+ fail_if (tmp == NULL);
+ fail_if (strcmp (tmp, "path") != 0);
+
+ g_free (tmp);
+}
+END_TEST
+
+TCase *
+make_empathy_utils_tcase (void)
+{
+ TCase *tc = tcase_create ("empathy-utils");
+ tcase_add_test (tc, test_empathy_substring);
+ return tc;
+}