test-client-custom-summary.c: Conditionally test phone numbers
authorTristan Van Berkom <tristanvb@openismus.com>
Tue, 29 Jan 2013 11:48:44 +0000 (20:48 +0900)
committerTristan Van Berkom <tristanvb@openismus.com>
Tue, 29 Jan 2013 13:05:05 +0000 (22:05 +0900)
Avoid testing phone numbers if ENABLE_PHONENUMBER is not defined
(i.e. if there is no phone number support, it won't work).

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

index 654fd5b..7cc74d7 100644 (file)
@@ -20,6 +20,7 @@
  *          Mathias Hasselmann <mathias@openismus.com>
  */
 
+#include <config.h>
 #include <stdlib.h>
 #include <libebook/libebook.h>
 
@@ -186,6 +187,7 @@ main (gint argc,
                "/client/search/suffix/email", search_test,
                e_book_query_field_test (E_CONTACT_EMAIL, E_BOOK_QUERY_ENDS_WITH, "jackson.com"),
                2);
+#ifdef ENABLE_PHONENUMBER
        add_client_test (
                "/client/search/eqphone/exact/phone", search_test,
                e_book_query_vcard_field_test(EVC_TEL, E_BOOK_QUERY_EQUALS_PHONE_NUMBER, "+1 221.542.3789"),
@@ -198,6 +200,7 @@ main (gint argc,
                "/client/search/eqphone/short/phone", search_test,
                e_book_query_vcard_field_test(EVC_TEL, E_BOOK_QUERY_EQUALS_SHORT_PHONE_NUMBER, "5423789"),
                1);
+#endif
 
        /* Add search tests that fetch uids */
        add_client_test (