Also test completion without filtering.
authorDaniel Carl <danielcarl@gmx.de>
Mon, 15 Oct 2018 21:56:46 +0000 (23:56 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Mon, 15 Oct 2018 21:56:46 +0000 (23:56 +0200)
tests/test-handler.c

index d71b1ad..a1d93d0 100644 (file)
@@ -81,10 +81,15 @@ static void test_handler_fill_completion(void)
     g_assert_cmpint(gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store), NULL), ==, 1);
     gtk_list_store_clear(store);
 
-    /* check case where no mathc is found */
+    /* check case where no match is found */
     g_assert_false(handler_fill_completion(handler, store, "unknown"));
     g_assert_cmpint(gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store), NULL), ==, 0);
     gtk_list_store_clear(store);
+
+    /* check case without apllied filters */
+    g_assert_true(handler_fill_completion(handler, store, ""));
+    g_assert_cmpint(gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store), NULL), ==, 4);
+    gtk_list_store_clear(store);
 }
 
 int main(int argc, char *argv[])