test: enable some more

This commit is contained in:
Dirk-Jan C. Binnema
2022-05-13 23:01:33 +03:00
parent 4edbe01aa0
commit 907751bc7b
3 changed files with 104 additions and 7 deletions

View File

@ -19,11 +19,11 @@
#
# BROKEN on ubuntu CI, but works elsewhere. Investigate
# test('test-cmd',
# executable('test-cmd',
# 'test-mu-cmd.cc',
# install: false,
# dependencies: [glib_dep, lib_test_mu_common_dep, config_h_dep, lib_mu_dep]))
test('test-cmd',
executable('test-cmd',
'test-mu-cmd.cc',
install: false,
dependencies: [glib_dep, lib_test_mu_common_dep, config_h_dep, lib_mu_dep]))
test('test-cmd-cfind',
executable('test-cmd-cfind',

View File

@ -31,6 +31,7 @@
#include "test-mu-common.hh"
#include "mu-store.hh"
#include "mu-query.hh"
#include "utils/mu-result.hh"
#include "utils/mu-utils.hh"
using namespace Mu;
@ -120,8 +121,9 @@ search_func(const char* query, unsigned expected)
static void
test_mu_index(void)
{
Mu::Store store{DBPATH + "/xapian", true};
g_assert_cmpuint(store.size(), ==, 13);
auto store = Store::make(DBPATH + "/xapian");
assert_valid_result(store);
g_assert_cmpuint(store->size(), ==, 13);
}
static void
@ -822,6 +824,12 @@ main(int argc, char* argv[])
{
int rv;
/* currently, something is broken on Ubuntu CI (but not elsewhere);
* selectively turn this test off */
if (!g_getenv("RUN_TEST_MU_CMD"))
return 0;
g_test_init(&argc, &argv, NULL);
if (!set_en_us_utf8_locale())