tests: Skip the gdatetime month names test when running uninstalled

It needs the translations to be installed. See the comment added to the
code.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=794180
This commit is contained in:
Philip Withnall 2018-03-09 17:48:35 +00:00
parent 36af567045
commit c4f58e362e

View File

@ -1562,6 +1562,17 @@ test_month_names (void)
g_test_bug ("749206");
/* If running uninstalled (G_TEST_BUILDDIR is set), skip this test, since we
* need the translations to be installed. We cant mess around with
* bindtextdomain() here, as the compiled .gmo files in po/ are not in the
* right installed directory hierarchy to be successfully loaded by gettext. */
if (g_getenv ("G_TEST_BUILDDIR") != NULL)
{
g_test_skip ("Skipping due to running uninstalled. "
"This test can only be run when the translations are installed.");
return;
}
oldlocale = g_strdup (setlocale (LC_ALL, NULL));
/* Make sure that nothing has been changed in western European languages. */