mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 14:06:15 +01:00
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:
parent
0d10dd9fe5
commit
f9f497a702
@ -300,6 +300,7 @@ usr_desktop_files = \
|
||||
evince-previewer.desktop \
|
||||
evince.desktop \
|
||||
file-roller.desktop \
|
||||
frobnicator.desktop \
|
||||
gcr-prompter.desktop \
|
||||
gcr-viewer.desktop \
|
||||
gedit.desktop \
|
||||
|
@ -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);
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=Frobnicator
|
||||
Comment=Frobnicate your life!
|
||||
Exec=/does-not-exist
|
||||
Icon=frobnicator
|
||||
StartupNotify=true
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=GNOME;GTK;Utilities
|
@ -962,7 +962,7 @@ test_measure (void)
|
||||
if (size > 0)
|
||||
g_assert_cmpuint (num_bytes, ==, size);
|
||||
g_assert_cmpuint (num_dirs, ==, 6);
|
||||
g_assert_cmpuint (num_files, ==, 30);
|
||||
g_assert_cmpuint (num_files, ==, 31);
|
||||
|
||||
g_object_unref (file);
|
||||
g_free (path);
|
||||
@ -1056,7 +1056,7 @@ test_measure_async (void)
|
||||
g_free (path);
|
||||
|
||||
data->expected_dirs = 6;
|
||||
data->expected_files = 30;
|
||||
data->expected_files = 31;
|
||||
|
||||
g_file_measure_disk_usage_async (file,
|
||||
G_FILE_MEASURE_APPARENT_SIZE,
|
||||
|
Loading…
Reference in New Issue
Block a user