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:
Florian Müllner
2018-04-24 15:21:06 +02:00
parent 1e2579da2c
commit 6343555605
2 changed files with 7 additions and 4 deletions

View File

@@ -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);