test-client-custom-summary: Added test for the 'x-evolution-any-field' NULL special...
authorTristan Van Berkom <tristanvb@openismus.com>
Sun, 1 Dec 2013 05:40:24 +0000 (14:40 +0900)
committerTristan Van Berkom <tristanvb@openismus.com>
Sun, 1 Dec 2013 06:44:36 +0000 (15:44 +0900)
x-evolution-any-field with a NULL value (or byte) means 'get all contacts'.

tests/libebook/client/test-client-custom-summary.c

index 87ddd49..df4cdd0 100644 (file)
@@ -401,6 +401,28 @@ main (gint argc,
                        suites[i].custom,
                        FALSE);
 
+               /* Special case should not be a fallback query */
+               add_client_test (
+                       suites[i].prefix,
+                       "/AnyFieldContains/NULL",
+                       suites[i].func,
+                       e_book_query_any_field_contains (NULL),
+                       N_CONTACTS,
+                       suites[i].direct,
+                       suites[i].custom,
+                       FALSE);
+
+               /* Special case should not be a fallback query */
+               add_client_test (
+                       suites[i].prefix,
+                       "/AnyFieldContains/\"\"",
+                       suites[i].func,
+                       e_book_query_any_field_contains (""),
+                       N_CONTACTS,
+                       suites[i].direct,
+                       suites[i].custom,
+                       FALSE);
+
                /* Add search tests that fetch contacts */
                add_client_test (
                        suites[i].prefix,