summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ralls <jralls@ceridwen.us>2012-10-18 10:47:18 -0700
committerJohn Ralls <jralls@ceridwen.us>2012-11-06 16:50:09 -0800
commitd5df0a10f142db8216cb41e38ec23d5729956650 (patch)
tree1ad1d67be384b107b746708e62824c43c1f9b642
parentb26fb3ae5cc18fa51cd6169f1b3b5c4dd74dab29 (diff)
downloadglib-d5df0a10f142db8216cb41e38ec23d5729956650.tar.gz
Skip test_non_utf8_printf() if EUC-JP is aliased to UTF-8
See https://bugzilla.gnome.org/show_bug.cgi?id=686185 This skips the test on those systems, like Darwin, which provide the ja_JP.eucjp locale but which glib doesn't know how to transcode and aliases JIS to UTF-8.
-rw-r--r--glib/tests/gdatetime.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
index 801758d15..5d7960235 100644
--- a/glib/tests/gdatetime.c
+++ b/glib/tests/gdatetime.c
@@ -885,6 +885,14 @@ test_non_utf8_printf (void)
g_free (oldlocale);
return;
}
+ if (g_strcmp0 (g_get_codeset (), "UTF-8") == 0)
+ {
+ g_test_message ("locale ja_JP.eucjp may be available, but glib seems to think that it's equivalent to UTF-8, skipping non-UTF-8 tests.");
+ g_test_message ("This is a known issue on Darwin");
+ setlocale (LC_ALL, oldlocale);
+ g_free (oldlocale);
+ return;
+ }
/* These are the outputs that ja_JP.UTF-8 generates; if everything
* is working then ja_JP.eucjp should generate the same.