tests: Set both environment variable and locale when running tests

Non-glibc gettext implementation seems to decide the language from
LC_MESSAGES environment variable instead of LC_MESSAGES locale, so
we should set both environment variable and locale when running tests
which need translation from specific languages.
This commit is contained in:
Ting-Wei Lan
2018-05-26 01:26:43 +08:00
parent 313a0fffe5
commit 6f2b3503a5
3 changed files with 11 additions and 0 deletions

View File

@@ -972,6 +972,8 @@ test_api (void)
int
main (int argc, char **argv)
{
g_setenv ("LC_ALL", "C", TRUE);
g_test_init (&argc, &argv, NULL);
g_test_dbus_unset ();