From d692243727a16d5aaea110d9861f20ed8021fcb5 Mon Sep 17 00:00:00 2001 From: "g.willems" Date: Tue, 12 Dec 2023 21:25:16 +0100 Subject: [PATCH] testsuite: fix icontheme test failure on win32 g_str_has_suffix() fails due to different path separators. Compare URIs instead. --- testsuite/gtk/icontheme.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/testsuite/gtk/icontheme.c b/testsuite/gtk/icontheme.c index f04b415ddd..777fb033fe 100644 --- a/testsuite/gtk/icontheme.c +++ b/testsuite/gtk/icontheme.c @@ -59,7 +59,7 @@ assert_icon_lookup_size (const char *icon_name, { GtkIconPaintable *info; GFile *file; - char *path = NULL; + char *uri = NULL; if (fallbacks) { @@ -83,26 +83,26 @@ assert_icon_lookup_size (const char *icon_name, file = gtk_icon_paintable_get_file (info); if (file) { - path = g_file_get_path (file); + uri = g_file_get_uri (file); g_object_unref (file); } if (filename) { - if (path == NULL || !g_str_has_suffix (path, filename)) + if (uri == NULL || !g_str_has_suffix (uri, filename)) { g_error ("Icon for \"%s\" with flags %s at size %d should be \"...%s\" but is \"...%s\"", icon_name, lookup_flags_to_string (flags), size, - filename, path); + filename, uri); return; } } else { - g_assert_null (path); + g_assert_null (uri); } - g_free (path); + g_free (uri); g_assert_cmpint (gdk_paintable_get_intrinsic_width (GDK_PAINTABLE (info)), ==, size);