diff options
author | Milan Crha <mcrha@redhat.com> | 2021-06-10 15:33:57 +0200 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2021-06-10 15:33:57 +0200 |
commit | f74a0975f4bc6f2261e7823c34fbcee2edbf8745 (patch) | |
tree | 86dd75091afcd2d0d34367c62434726e9b3c988a /tests | |
parent | 63e893eb5d5745ccd81e548530a9eca260e184a0 (diff) | |
download | evolution-data-server-f74a0975f4bc6f2261e7823c34fbcee2edbf8745.tar.gz |
tests: Workaround libphonenumber behavior change
Turn off the sub-test, because different libphonenumber behaves
differently. Having a (runtime) way to check the libphonenumber version
it could be adapted in a better way.
Diffstat (limited to 'tests')
4 files changed, 8 insertions, 4 deletions
diff --git a/tests/libedata-book/data-test-utils.c b/tests/libedata-book/data-test-utils.c index 633771b0e..9b7c84a60 100644 --- a/tests/libedata-book/data-test-utils.c +++ b/tests/libedata-book/data-test-utils.c @@ -645,6 +645,7 @@ test_step (EbSqlCursorFixture *fixture, * contact changes only happen because of e164 number interpretations. */ if (e_phone_number_is_supported () && + assertion->count != -1 && assertion->count != n_locale_changes) g_error ( "Expected %d e164 numbers to change, %d actually changed.", diff --git a/tests/libedata-book/test-book-cache-cursor-change-locale.c b/tests/libedata-book/test-book-cache-cursor-change-locale.c index cce27a0b0..c98ecba38 100644 --- a/tests/libedata-book/test-book-cache-cursor-change-locale.c +++ b/tests/libedata-book/test-book-cache-cursor-change-locale.c @@ -84,7 +84,7 @@ main (gint argc, tcu_step_test_add_assertion (data, 5, 17, 16, 18, 10, 14); tcu_step_test_add_assertion (data, 5, 13, 12, 9, 19, 20); - /* When changing from fr_CA to de_DE, two numbers change: + /* Depending on the libphonenumber, when changing from fr_CA to de_DE, two numbers change: * * sorted-5: * 049-2459-4393 is now parsed with the national number as 4924594393 @@ -92,8 +92,9 @@ main (gint argc, * sorted-4: * 12 245999 is now parsed with national number 12245999 instead of 2245999 * + * or only one. Skip this check, because a lack of a way to get the libphonenumber version. */ - tcu_step_test_change_locale (data, "de_DE.UTF-8", 2); + tcu_step_test_change_locale (data, "de_DE.UTF-8", -1); tcu_step_test_add_assertion (data, 5, 11, 1, 2, 5, 6); tcu_step_test_add_assertion (data, 5, 7, 8, 4, 3, 15); tcu_step_test_add_assertion (data, 5, 17, 16, 18, 10, 14); diff --git a/tests/libedata-book/test-book-cache-utils.c b/tests/libedata-book/test-book-cache-utils.c index 6ff294596..7be44e4dc 100644 --- a/tests/libedata-book/test-book-cache-utils.c +++ b/tests/libedata-book/test-book-cache-utils.c @@ -579,6 +579,7 @@ test_step (TCUCursorFixture *fixture, * contact changes only happen because of e164 number interpretations. */ if (e_phone_number_is_supported () && + assertion->count != -1 && assertion->count != n_locale_changes) g_error ("Expected %d e164 numbers to change, %d actually changed.", assertion->count, n_locale_changes); diff --git a/tests/libedata-book/test-sqlite-cursor-change-locale.c b/tests/libedata-book/test-sqlite-cursor-change-locale.c index 859857a39..65671d1df 100644 --- a/tests/libedata-book/test-sqlite-cursor-change-locale.c +++ b/tests/libedata-book/test-sqlite-cursor-change-locale.c @@ -87,7 +87,7 @@ main (gint argc, step_test_add_assertion (data, 5, 17, 16, 18, 10, 14); step_test_add_assertion (data, 5, 13, 12, 9, 19, 20); - /* When changing from fr_CA to de_DE, two numbers change: + /* Depending on the libphonenumber, when changing from fr_CA to de_DE, two numbers change: * * sorted-5: * 049-2459-4393 is now parsed with the national number as 4924594393 @@ -95,8 +95,9 @@ main (gint argc, * sorted-4: * 12 245999 is now parsed with national number 12245999 instead of 2245999 * + * or only one. Skip this check, because a lack of a way to get the libphonenumber version. */ - step_test_change_locale (data, "de_DE.UTF-8", 2); + step_test_change_locale (data, "de_DE.UTF-8", -1); step_test_add_assertion (data, 5, 11, 1, 2, 5, 6); step_test_add_assertion (data, 5, 7, 8, 4, 3, 15); step_test_add_assertion (data, 5, 17, 16, 18, 10, 14); |