mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 17:56:17 +01:00
tests/gvariant: Canonicalize to lower case to work on Illumos (OpenSolaris)
Solaris libc gives lowercase strings. https://bugzilla.gnome.org/show_bug.cgi?id=704585
This commit is contained in:
parent
31aee73285
commit
dc87c453fb
@ -3746,6 +3746,7 @@ test_parses (void)
|
||||
const gchar *tests[] = { "inf", "-inf", "nan" };
|
||||
GVariant *value;
|
||||
gchar *printed;
|
||||
gchar *printed_down;
|
||||
gint i;
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (tests); i++)
|
||||
@ -3753,8 +3754,11 @@ test_parses (void)
|
||||
GError *error = NULL;
|
||||
value = g_variant_parse (NULL, tests[i], NULL, NULL, &error);
|
||||
printed = g_variant_print (value, FALSE);
|
||||
g_assert (g_str_has_prefix (printed, tests[i]));
|
||||
/* Canonicalize to lowercase; https://bugzilla.gnome.org/show_bug.cgi?id=704585 */
|
||||
printed_down = g_ascii_strdown (printed, -1);
|
||||
g_assert (g_str_has_prefix (printed_down, tests[i]));
|
||||
g_free (printed);
|
||||
g_free (printed_down);
|
||||
g_variant_unref (value);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user