[glib] tests: properly set locale to C



commit ac8b7ba9250a55f0fe8fcad16cb6e9e4f60c6946
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Sep 12 14:22:56 2013 -0400

    tests: properly set locale to C
    
    We're testing for particular error messages, so we need to set to a C
    locale to make sure we get the untranslated version.
    
    Previously, this test set the LANG environment variable, but that's not
    good enough if LANGUAGE is also set.  The only way to ensure that
    LANGUAGE is ignored is to disable l10n with LC_ALL=C.

 glib/tests/markup-parse.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/tests/markup-parse.c b/glib/tests/markup-parse.c
index 00e9336..29e88e2 100644
--- a/glib/tests/markup-parse.c
+++ b/glib/tests/markup-parse.c
@@ -277,7 +277,7 @@ main (int argc, char *argv[])
   const gchar *name;
   gchar *path;
 
-  g_setenv ("LANG", "en_US.utf-8", TRUE);
+  g_setenv ("LC_ALL", "C", TRUE);
   setlocale (LC_ALL, "");
 
   g_test_init (&argc, &argv, NULL);


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