[evolution-data-server/sqlite-refactor: 14/14] test-client-custom-summary: Added test which searches by UID



commit 5437fd9cfee61d147fbbadfe8961348dbdd230f2
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Wed Nov 27 21:36:59 2013 +0900

    test-client-custom-summary: Added test which searches by UID

 tests/libebook/client/test-client-custom-summary.c |   35 ++++++++++++++++++++
 tests/libebook/data/vcards/custom-4.vcf            |    2 +-
 2 files changed, 36 insertions(+), 1 deletions(-)
---
diff --git a/tests/libebook/client/test-client-custom-summary.c 
b/tests/libebook/client/test-client-custom-summary.c
index dc13367..e6cb50e 100644
--- a/tests/libebook/client/test-client-custom-summary.c
+++ b/tests/libebook/client/test-client-custom-summary.c
@@ -518,6 +518,41 @@ main (gint argc,
 
                add_client_test (
                        suites[i].prefix,
+                       "/Or/SearchByUID",
+                       suites[i].func,
+                       e_book_query_orv (
+                               e_book_query_field_test (
+                                       E_CONTACT_UID,
+                                       E_BOOK_QUERY_IS,
+                                       "custom-1"),
+                               e_book_query_field_test (
+                                       E_CONTACT_UID,
+                                       E_BOOK_QUERY_IS,
+                                       "custom-2"),
+                               e_book_query_field_test (
+                                       E_CONTACT_UID,
+                                       E_BOOK_QUERY_IS,
+                                       "custom-3"),
+                               /* This one has a capital C, test will fail
+                                * if the backend mistakenly normalizes the
+                                * UID for comparison.
+                                */
+                               e_book_query_field_test (
+                                       E_CONTACT_UID,
+                                       E_BOOK_QUERY_IS,
+                                       "Custom-4"),
+                               e_book_query_field_test (
+                                       E_CONTACT_UID,
+                                       E_BOOK_QUERY_IS,
+                                       "custom-5"),
+                               NULL),
+                       5,
+                       suites[i].direct,
+                       suites[i].custom,
+                       FALSE);
+
+               add_client_test (
+                       suites[i].prefix,
                        "/Or/TwoEmails",
                        suites[i].func,
                        e_book_query_orv (
diff --git a/tests/libebook/data/vcards/custom-4.vcf b/tests/libebook/data/vcards/custom-4.vcf
index 2bee4a8..77e2990 100644
--- a/tests/libebook/data/vcards/custom-4.vcf
+++ b/tests/libebook/data/vcards/custom-4.vcf
@@ -1,5 +1,5 @@
 BEGIN:VCARD
-UID:custom-4
+UID:Custom-4
 FN:Big Bobby Brown
 TEL;TYPE=work,pref:+9999999
 EMAIL:big bobby brown org


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