mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01:00
tests: Update search tests for desktop-icon-info
Because we now put substring match in the next group of prefix match, the test cases should also be updated.
This commit is contained in:
parent
f81a9d226b
commit
0e612effbe
@ -867,11 +867,12 @@ test_search (void)
|
|||||||
assert_search ("image viewer", "", TRUE, TRUE, NULL, NULL);
|
assert_search ("image viewer", "", TRUE, TRUE, NULL, NULL);
|
||||||
|
|
||||||
/* There're "flatpak" apps (clocks) installed as well - they should *not*
|
/* There're "flatpak" apps (clocks) installed as well - they should *not*
|
||||||
* match the prefix command ("/bin/sh") in the Exec= line though. However,
|
* match the prefix command ("/bin/sh") in the Exec= line though. Then with
|
||||||
* with substring matching, Image Viewer (eog) should be in result list
|
* substring matching, Image Viewer (eog) should be in next group because it
|
||||||
* because it contains "Slideshow" in its keywords.
|
* contains "Slideshow" in its keywords.
|
||||||
*/
|
*/
|
||||||
assert_search ("sh", "eog.desktop gnome-terminal.desktop\n", TRUE, FALSE, NULL, NULL);
|
assert_search ("sh", "gnome-terminal.desktop\n"
|
||||||
|
"eog.desktop\n", TRUE, FALSE, NULL, NULL);
|
||||||
|
|
||||||
/* "frobnicator.desktop" is ignored by get_all() because the binary is
|
/* "frobnicator.desktop" is ignored by get_all() because the binary is
|
||||||
* missing, but search should still find it (to avoid either stale results
|
* missing, but search should still find it (to avoid either stale results
|
||||||
@ -886,11 +887,12 @@ test_search (void)
|
|||||||
assert_search ("files file fil fi f", "nautilus.desktop\n"
|
assert_search ("files file fil fi f", "nautilus.desktop\n"
|
||||||
"gedit.desktop\n", TRUE, TRUE, NULL, NULL);
|
"gedit.desktop\n", TRUE, TRUE, NULL, NULL);
|
||||||
|
|
||||||
/* With substring match, "con" match dconf, contacts, nautilus-classic (which
|
/* "con" will match "connect" and "contacts" on name with prefix match in
|
||||||
* has a name called "Desktop Icons"), nautilus-connect-server (which has a
|
* first group, then match "Dconf Editor" and "Desktop Icons" with substring
|
||||||
* name called "Connect to Server").
|
* match in next group.
|
||||||
*/
|
*/
|
||||||
assert_search ("con", "dconf-editor.desktop gnome-contacts.desktop nautilus-classic.desktop nautilus-connect-server.desktop\n", TRUE, TRUE, NULL, NULL);
|
assert_search ("con", "gnome-contacts.desktop nautilus-connect-server.desktop\n"
|
||||||
|
"dconf-editor.desktop nautilus-classic.desktop\n", TRUE, TRUE, NULL, NULL);
|
||||||
|
|
||||||
/* "gnome" will match "eye of gnome" from the user's directory, plus
|
/* "gnome" will match "eye of gnome" from the user's directory, plus
|
||||||
* matching "GNOME Clocks" X-GNOME-FullName. It's only a comment on
|
* matching "GNOME Clocks" X-GNOME-FullName. It's only a comment on
|
||||||
|
Loading…
Reference in New Issue
Block a user