tests: Add .desktop file for non-existent binary ...

... to test that it is filtered out correctly by
g_desktop_app_info_load_from_keyfile() (but not
g_desktop_app_info_search()).

https://bugzilla.gnome.org/show_bug.cgi?id=795488
This commit is contained in:
Florian Müllner
2018-04-24 16:01:36 +02:00
parent 0d10dd9fe5
commit f9f497a702
4 changed files with 18 additions and 2 deletions

View File

@@ -672,6 +672,12 @@ test_search (void)
*/
assert_search ("sh", "gnome-terminal.desktop\n", TRUE, FALSE, NULL, NULL);
/* "frobnicator.desktop" is ignored by get_all() because the binary is
* missing, but search should still find it (to avoid either stale results
* from the cache or expensive stat() calls for each potential result)
*/
assert_search ("frobni", "frobnicator.desktop\n", TRUE, FALSE, NULL, NULL);
/* Obvious multi-word search */
assert_search ("gno hel", "yelp.desktop\n", TRUE, TRUE, NULL, NULL);