diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am index 0c5f6616b..410f11d95 100644 --- a/gio/tests/Makefile.am +++ b/gio/tests/Makefile.am @@ -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 \ diff --git a/gio/tests/desktop-app-info.c b/gio/tests/desktop-app-info.c index face99da3..669db5769 100644 --- a/gio/tests/desktop-app-info.c +++ b/gio/tests/desktop-app-info.c @@ -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); diff --git a/gio/tests/desktop-files/usr/applications/frobnicator.desktop b/gio/tests/desktop-files/usr/applications/frobnicator.desktop new file mode 100644 index 000000000..0a8dbfa39 --- /dev/null +++ b/gio/tests/desktop-files/usr/applications/frobnicator.desktop @@ -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 diff --git a/gio/tests/file.c b/gio/tests/file.c index 98eeb85d4..1519448ee 100644 --- a/gio/tests/file.c +++ b/gio/tests/file.c @@ -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,