Skip to content
Snippets Groups Projects
Commit bf4ce5b9 authored by Ludovico de Nittis's avatar Ludovico de Nittis
Browse files

tests: Remove Arch Linux SUPPORTED locale missing issue

Since glibc 2.36-4, Arch Linux started to include the
`/usr/share/i18n/SUPPORTED` file.
https://github.com/archlinux/svntogit-packages/commit/3c537bee8d7921bc0af775fdb4d69124026532ac



For this reason we don't need to special case Arch Linux anymore in our
tests.

Signed-off-by: default avatarLudovico de Nittis <ludovico.denittis@collabora.com>
parent 57e16afe
No related branches found
No related tags found
1 merge request!494tests: Remove Arch Linux SUPPORTED locale missing issue
Pipeline #33622 failed
......@@ -128,22 +128,6 @@ test_object (Fixture *f,
g_object_unref (locale);
}
static gboolean
is_host_os_like (SrtSystemInfo *info,
const gchar *host)
{
g_auto(GStrv) os_like = NULL;
gsize i;
os_like = srt_system_info_dup_os_id_like (info, TRUE);
for (i = 0; os_like != NULL && os_like[i] != NULL; i++)
{
if (g_strcmp0 (os_like[i], host) == 0)
return TRUE;
}
return FALSE;
}
static void
test_complete (Fixture *f,
gconstpointer context)
......@@ -151,20 +135,13 @@ test_complete (Fixture *f,
SrtLocale *locale = NULL;
SrtSystemInfo *info = srt_system_info_new (NULL);
SrtLocaleIssues issues;
SrtLocaleIssues additional_issues = SRT_LOCALE_ISSUES_NONE;
GError *error = NULL;
/* With Arch Linux it is expected to not have the SUPPORTED locale file */
if (is_host_os_like (info, "arch"))
additional_issues = SRT_LOCALE_ISSUES_I18N_SUPPORTED_MISSING;
srt_system_info_set_primary_multiarch_tuple (info, "mock");
srt_system_info_set_helpers_path (info, f->builddir);
issues = srt_system_info_get_locale_issues (info);
g_assert_cmpint (issues, ==,
(SRT_LOCALE_ISSUES_NONE
| additional_issues));
g_assert_cmpint (issues, ==, SRT_LOCALE_ISSUES_NONE);
locale = srt_system_info_check_locale (info, "C", &error);
g_assert_no_error (error);
......@@ -245,20 +222,15 @@ test_legacy (Fixture *f,
SrtLocale *locale = NULL;
SrtSystemInfo *info = srt_system_info_new (NULL);
SrtLocaleIssues issues;
SrtLocaleIssues additional_issues = SRT_LOCALE_ISSUES_NONE;
GError *error = NULL;
if (is_host_os_like (info, "arch"))
additional_issues = SRT_LOCALE_ISSUES_I18N_SUPPORTED_MISSING;
srt_system_info_set_primary_multiarch_tuple (info, "mock-legacy");
srt_system_info_set_helpers_path (info, f->builddir);
issues = srt_system_info_get_locale_issues (info);
g_assert_cmpint (issues, ==,
(SRT_LOCALE_ISSUES_DEFAULT_NOT_UTF8
| SRT_LOCALE_ISSUES_C_UTF8_MISSING
| additional_issues));
| SRT_LOCALE_ISSUES_C_UTF8_MISSING));
locale = srt_system_info_check_locale (info, "C", &error);
g_assert_no_error (error);
......@@ -334,19 +306,13 @@ test_unamerican (Fixture *f,
SrtLocale *locale = NULL;
SrtSystemInfo *info = srt_system_info_new (NULL);
SrtLocaleIssues issues;
SrtLocaleIssues additional_issues = SRT_LOCALE_ISSUES_NONE;
GError *error = NULL;
if (is_host_os_like (info, "arch"))
additional_issues = SRT_LOCALE_ISSUES_I18N_SUPPORTED_MISSING;
srt_system_info_set_primary_multiarch_tuple (info, "mock-unamerican");
srt_system_info_set_helpers_path (info, f->builddir);
issues = srt_system_info_get_locale_issues (info);
g_assert_cmpint (issues, ==,
(SRT_LOCALE_ISSUES_EN_US_UTF8_MISSING
| additional_issues));
g_assert_cmpint (issues, ==, SRT_LOCALE_ISSUES_EN_US_UTF8_MISSING);
locale = srt_system_info_check_locale (info, "C", &error);
g_assert_no_error (error);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment