mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-04 08:23:38 +02:00
tests: Fix desktop-app-info test
g_desktop_app_info_load_from_keyfile() refuses to load .desktop files
where the executable doesn't exist. Therefore whether or not the .desktop
file added in commit 148995544
is actually considered during tests depends
on /usr/bin/flatpak being installed. This isn't a safe assumption to make,
so use /bin/sh to test filtering of "prefix" commands.
https://bugzilla.gnome.org/show_bug.cgi?id=795488
This commit is contained in:
@@ -667,10 +667,10 @@ test_search (void)
|
||||
assert_search ("image viewer", "", FALSE, TRUE, NULL, NULL);
|
||||
assert_search ("image viewer", "", TRUE, TRUE, NULL, NULL);
|
||||
|
||||
/* There're flatpak apps installed as well - they should *not* match
|
||||
* the "flatpak" command in the Exec= line though.
|
||||
/* There're "flatpak" apps (clocks) installed as well - they should *not*
|
||||
* match the prefix command ("/bin/sh") in the Exec= line though.
|
||||
*/
|
||||
assert_search ("flatpak", "", TRUE, FALSE, NULL, NULL);
|
||||
assert_search ("sh", "gnome-terminal.desktop\n", TRUE, FALSE, NULL, NULL);
|
||||
|
||||
/* Obvious multi-word search */
|
||||
assert_search ("gno hel", "yelp.desktop\n", TRUE, TRUE, NULL, NULL);
|
||||
|
Reference in New Issue
Block a user