mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
tests: Unset CHARSET when testing locales to avoid it breaking tests
The charset set in `CHARSET` overrides the charset after the `.` in any `LC_*` category (set via the environment or `setlocale()`). This will break many tests, but in particular it definitely breaks the `/GDateTime/format_mixed/` tests which are specifically checking different charsets being set for different `LC_*` categories. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: #2514
This commit is contained in:
parent
7dc7b84a52
commit
3fecaa3924
@ -3047,6 +3047,10 @@ main (gint argc,
|
||||
* Unset it to avoid interference with tests using setlocale and translation. */
|
||||
g_unsetenv ("LANGUAGE");
|
||||
|
||||
/* GLib uses CHARSET to allow overriding the character set used for all locale
|
||||
* categories. Unset it to avoid interference with tests. */
|
||||
g_unsetenv ("CHARSET");
|
||||
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
|
||||
/* GDateTime Tests */
|
||||
|
Loading…
Reference in New Issue
Block a user