[evolution-data-server/openismus-work: 70/122] Extending test-client-custom-summary to try e_book_client_get_contacts_uids()



commit ee65019392a28831f43e13a1523fa004edd7a769
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Thu Nov 29 20:32:15 2012 +0900

    Extending test-client-custom-summary to try e_book_client_get_contacts_uids()

 tests/libebook/client/test-client-custom-summary.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/tests/libebook/client/test-client-custom-summary.c b/tests/libebook/client/test-client-custom-summary.c
index 1c942fd..09a5159 100644
--- a/tests/libebook/client/test-client-custom-summary.c
+++ b/tests/libebook/client/test-client-custom-summary.c
@@ -237,6 +237,20 @@ main (gint argc,
 	e_book_query_unref (query);
 	g_free (sexp);
 
+	/* Query email suffix... fetching uids */
+	query = e_book_query_field_test (E_CONTACT_EMAIL, E_BOOK_QUERY_ENDS_WITH, "jackson.com");
+	sexp = e_book_query_to_string (query);
+
+	if (!e_book_client_get_contacts_uids_sync (book_client, sexp, &results, NULL, &error)) {
+		report_error ("get contacts", &error);
+		g_object_unref (book_client);
+		return 1;
+	}
+	g_assert_cmpint (g_slist_length (results), ==, 2);
+	e_util_free_string_slist (results);
+	e_book_query_unref (query);
+	g_free (sexp);
+
 	if (!e_client_remove_sync (E_CLIENT (book_client), NULL, &error)) {
 		report_error ("client remove sync", &error);
 		g_object_unref (book_client);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]