mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
desktopappinfo: add Exec to searchable keys
Add the basename from the first component of the Exec line to the list of strings to search for via g_desktop_app_info_search(). We treat Exec as a fairly strong match -- just below the visible name. Add a testcase to make sure everything is working OK. https://bugzilla.gnome.org/show_bug.cgi?id=725023
This commit is contained in:
@@ -654,6 +654,15 @@ test_search (void)
|
||||
"gnome-clocks.desktop\n"
|
||||
"yelp.desktop gnome-contacts.desktop\n", TRUE, TRUE, NULL, NULL);
|
||||
|
||||
/* eog has exec name 'false' in usr only */
|
||||
assert_search ("false", "eog.desktop\n", TRUE, FALSE, NULL, NULL);
|
||||
assert_search ("false", "", FALSE, TRUE, NULL, NULL);
|
||||
assert_search ("false", "", TRUE, TRUE, NULL, NULL);
|
||||
assert_search ("false", "", FALSE, FALSE, NULL, NULL);
|
||||
|
||||
/* make sure we only search the first component */
|
||||
assert_search ("nonsearchable", "", TRUE, FALSE, NULL, NULL);
|
||||
|
||||
/* "gnome con" will match only gnome contacts; via the name for
|
||||
* "contacts" and the comment for "gnome"
|
||||
*/
|
||||
|
Reference in New Issue
Block a user