[nautilus/sam/tracker-3: 9/15] tests: Make Tracker search test return error code on failure
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/sam/tracker-3: 9/15] tests: Make Tracker search test return error code on failure
- Date: Sun, 10 May 2020 20:48:30 +0000 (UTC)
commit dbe0a59ed5fe6b77a6b0cd9d0129a689c5c87067
Author: Sam Thursfield <sam afuera me uk>
Date: Sat May 2 16:44:44 2020 +0200
tests: Make Tracker search test return error code on failure
Previously the test could appear to succeed even if the search
didn't work as expected.
test/automated/displayless/test-nautilus-search-engine-tracker.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/test/automated/displayless/test-nautilus-search-engine-tracker.c
b/test/automated/displayless/test-nautilus-search-engine-tracker.c
index 0de2d404b..21e86e202 100644
--- a/test/automated/displayless/test-nautilus-search-engine-tracker.c
+++ b/test/automated/displayless/test-nautilus-search-engine-tracker.c
@@ -1,5 +1,7 @@
#include "test-utilities.h"
+guint total_hits = 0;
+
static void
hits_added_cb (NautilusSearchEngine *engine,
GSList *hits)
@@ -8,6 +10,7 @@ hits_added_cb (NautilusSearchEngine *engine,
for (gint hit_number = 0; hits != NULL; hits = hits->next, hit_number++)
{
g_print ("Hit %i: %s\n", hit_number, nautilus_search_hit_get_uri (hits->data));
+ total_hits += 1;
}
}
@@ -102,5 +105,8 @@ main (int argc,
NAUTILUS_SEARCH_ENGINE_TRACKER_ENGINE);
g_main_loop_run (loop);
+
+ g_assert_cmpint (total_hits, ==, 1);
+
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]