diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-07-14 08:27:30 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-07-14 08:27:30 -0400 |
commit | b458d3da325c94308f442cebe897c6648938c119 (patch) | |
tree | dda326d343320bdaac7efdc14d5a1d502e374f3b | |
parent | 60fe7b46d2a500bd6a5cd47105dc3172acf9c7a9 (diff) | |
download | glib-b458d3da325c94308f442cebe897c6648938c119.tar.gz |
Fix a failing testcase
This fix is a bit of a blind guess, I couldn't really discern
from recent commits whether this is an expected behavior change
or not.
-rw-r--r-- | gio/tests/desktop-app-info.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gio/tests/desktop-app-info.c b/gio/tests/desktop-app-info.c index 22dd4b76d..ccd6357a9 100644 --- a/gio/tests/desktop-app-info.c +++ b/gio/tests/desktop-app-info.c @@ -182,11 +182,16 @@ test_fallback (void) app = g_list_nth_data (recomm, 0); g_assert (g_app_info_equal (info1, app)); - /* and that Test2 is the first fallback */ + /* and that Test2 is among the fallback apps */ fallback = g_app_info_get_fallback_for_type ("text/x-python"); g_assert (fallback != NULL); - app = g_list_nth_data (fallback, 0); - g_assert (g_app_info_equal (info2, app)); + for (l = fallback; l; l = l->next) + { + app = l->data; + if (g_app_info_equal (info2, app)) + break; + } + g_assert_cmpstr (g_app_info_get_name (app), ==, "Test2"); /* check that recomm + fallback = all applications */ list = g_list_concat (g_list_copy (recomm), g_list_copy (fallback)); |