[glib/glib-2-34] Skip test_non_utf8_printf() if EUC-JP is aliased to UTF-8



commit d27d3663979b99b8fc83b2eb84eed57b0e851dee
Author: John Ralls <jralls ceridwen us>
Date:   Thu Oct 18 10:47:18 2012 -0700

    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.

 glib/tests/gdatetime.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
index 5d28ed9..4e5ae25 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_get_charset (NULL))
+    {
+      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.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]