aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook/tests/ebook/test-string.c
blob: b7cdbb372032c665f530b0a98595e6068801720a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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");
}