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.
This commit is contained in:
Ryan Lortie 2013-09-12 14:22:56 -04:00
parent 8ab1b58ffd
commit ac8b7ba925

View File

@ -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);