diff options
Diffstat (limited to 'addressbook/backend/ebook/tests/ebook/test-string.c')
-rw-r--r-- | addressbook/backend/ebook/tests/ebook/test-string.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/addressbook/backend/ebook/tests/ebook/test-string.c b/addressbook/backend/ebook/tests/ebook/test-string.c new file mode 100644 index 0000000000..b7cdbb3720 --- /dev/null +++ b/addressbook/backend/ebook/tests/ebook/test-string.c @@ -0,0 +1,27 @@ + +#include "ebook/e-book.h" +#include <libgnome/gnome-init.h> +#include <bonobo/bonobo-main.h> +#include <stdlib.h> + +#define TEST_ID "test-uid" + +int +main (int argc, char **argv) +{ + EContact *contact; + + gnome_program_init("test-string", "0.0", LIBGNOME_MODULE, argc, argv, NULL); + + if (bonobo_init (&argc, argv) == FALSE) + g_error ("Could not initialize Bonobo"); + + contact = e_contact_new (); + + e_contact_set (contact, E_CONTACT_UID, TEST_ID); + + if (!strcmp (e_contact_get_const (contact, E_CONTACT_UID), TEST_ID)) + printf ("passed\n"); + else + printf ("failed\n"); +} |