summaryrefslogtreecommitdiff
path: root/tests/libebook
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-04-17 10:37:13 -0400
committerMatthew Barnes <mbarnes@redhat.com>2013-04-17 13:00:37 -0400
commit6a440ebb07a846ba40920c746bfb846992d6133a (patch)
treedfcd8d7af3811b42ae0663bef4e8af08ef46b500 /tests/libebook
parent0342aecbfda8bea93726c63873dd61011deaab50 (diff)
downloadevolution-data-server-6a440ebb07a846ba40920c746bfb846992d6133a.tar.gz
LC_ADDRESS is a GNU extension. Treat it as such.
Unconditional use of the GNU extension LC_ADDRESS causes compiler errors on non-GNU systems. In test cases, use LC_MESSAGES if LC_ADDRESS is unavailable. Also fail gracefully with a log message if setlocale() fails.
Diffstat (limited to 'tests/libebook')
-rw-r--r--tests/libebook/client/test-client-custom-summary.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/libebook/client/test-client-custom-summary.c b/tests/libebook/client/test-client-custom-summary.c
index bf1add349..d63c31ce1 100644
--- a/tests/libebook/client/test-client-custom-summary.c
+++ b/tests/libebook/client/test-client-custom-summary.c
@@ -343,7 +343,10 @@ main (gint argc,
g_setenv ("LC_ALL", "en_US.UTF-8", TRUE);
setlocale (LC_ALL, "");
+#if defined (LC_ADDRESS)
+ /* LC_ADDRESS is a GNU extension. */
g_assert_cmpstr (setlocale (LC_ADDRESS, NULL), ==, "en_US.UTF-8");
+#endif
/* Test all queries in 8 different combinations specified by the 'suites'
*/