mirror of https://github.com/djcb/mu.git
tests: update for lib/mu-store changes
This commit is contained in:
parent
26dca831c6
commit
be4860befe
|
@ -32,7 +32,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "test-mu-common.h"
|
||||
#include "mu-store.h"
|
||||
#include "mu-store.hh"
|
||||
|
||||
|
||||
/* tests for the command line interface, uses testdir2 */
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <locale.h>
|
||||
|
||||
#include "test-mu-common.h"
|
||||
#include "mu-store.h"
|
||||
#include "mu-store.hh"
|
||||
|
||||
static void
|
||||
test_mu_store_new_destroy (void)
|
||||
|
@ -44,7 +44,7 @@ test_mu_store_new_destroy (void)
|
|||
g_assert (tmpdir);
|
||||
|
||||
err = NULL;
|
||||
store = mu_store_new_writable (tmpdir, FALSE, &err);
|
||||
store = mu_store_new_create (tmpdir, "/tmp", &err);
|
||||
g_assert_no_error (err);
|
||||
g_assert (store);
|
||||
|
||||
|
@ -68,17 +68,17 @@ test_mu_store_version (void)
|
|||
g_assert (tmpdir);
|
||||
|
||||
err = NULL;
|
||||
store = mu_store_new_writable (tmpdir, FALSE, &err);
|
||||
store = mu_store_new_create (tmpdir, "/tmp", &err);
|
||||
g_assert (store);
|
||||
mu_store_unref (store);
|
||||
store = mu_store_new_read_only (tmpdir, &err);
|
||||
store = mu_store_new_readable (tmpdir, &err);
|
||||
g_assert (store);
|
||||
|
||||
g_assert (err == NULL);
|
||||
|
||||
g_assert_cmpuint (0,==,mu_store_count (store, NULL));
|
||||
g_assert_cmpstr (MU_STORE_SCHEMA_VERSION,==,
|
||||
mu_store_version(store));
|
||||
mu_store_schema_version(store));
|
||||
|
||||
mu_store_unref (store);
|
||||
g_free (tmpdir);
|
||||
|
@ -95,7 +95,7 @@ test_mu_store_store_msg_and_count (void)
|
|||
tmpdir = test_mu_common_get_random_tmpdir();
|
||||
g_assert (tmpdir);
|
||||
|
||||
store = mu_store_new_writable (tmpdir, FALSE, NULL);
|
||||
store = mu_store_new_create (tmpdir, MU_TESTMAILDIR, NULL);
|
||||
g_assert (store);
|
||||
g_free (tmpdir);
|
||||
|
||||
|
@ -153,7 +153,7 @@ test_mu_store_store_msg_remove_and_count (void)
|
|||
tmpdir = test_mu_common_get_random_tmpdir();
|
||||
g_assert (tmpdir);
|
||||
|
||||
store = mu_store_new_writable (tmpdir, FALSE, NULL);
|
||||
store = mu_store_new_create (tmpdir, MU_TESTMAILDIR, NULL);
|
||||
g_assert (store);
|
||||
|
||||
g_assert_cmpuint (0,==,mu_store_count (store, NULL));
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "test-mu-common.h"
|
||||
#include "mu-store.h"
|
||||
#include "mu-store.hh"
|
||||
|
||||
static gchar *CONTACTS_CACHE = NULL;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "test-mu-common.h"
|
||||
#include "mu-store.h"
|
||||
#include "mu-store.hh"
|
||||
|
||||
|
||||
/* tests for the command line interface, uses testdir2 */
|
||||
|
@ -122,7 +122,7 @@ test_mu_index (void)
|
|||
|
||||
xpath = g_strdup_printf ("%s%c%s", DBPATH, G_DIR_SEPARATOR, "xapian");
|
||||
|
||||
store = mu_store_new_read_only (xpath, NULL);
|
||||
store = mu_store_new_readable (xpath, NULL);
|
||||
g_assert (store);
|
||||
|
||||
g_assert_cmpuint (mu_store_count (store, NULL), ==, 13);
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "test-mu-common.h"
|
||||
#include "mu-query.h"
|
||||
#include "mu-str.h"
|
||||
#include "mu-store.h"
|
||||
#include "mu-store.hh"
|
||||
|
||||
static char* DB_PATH1 = NULL;
|
||||
static char* DB_PATH2 = NULL;
|
||||
|
@ -100,7 +100,7 @@ run_and_count_matches_with_query_flags (const char *xpath, const char *query,
|
|||
GError *err;
|
||||
|
||||
err = NULL;
|
||||
store = mu_store_new_read_only (xpath, &err);
|
||||
store = mu_store_new_readable (xpath, &err);
|
||||
if (err) {
|
||||
g_printerr ("error: %s\n", err->message);
|
||||
g_clear_error (&err);
|
||||
|
@ -305,7 +305,7 @@ test_mu_query_accented_chars_01 (void)
|
|||
GError *err;
|
||||
gchar *summ;
|
||||
|
||||
store = mu_store_new_read_only (DB_PATH1, NULL);
|
||||
store = mu_store_new_readable (DB_PATH1, NULL);
|
||||
g_assert (store);
|
||||
|
||||
query = mu_query_new (store, NULL);
|
||||
|
|
|
@ -124,7 +124,7 @@ run_and_get_iter_full (const char *xpath, const char *query,
|
|||
MuStore *store;
|
||||
MuMsgIter *iter;
|
||||
|
||||
store = mu_store_new_read_only (xpath, NULL);
|
||||
store = mu_store_new_readable (xpath, NULL);
|
||||
g_assert (store);
|
||||
|
||||
mquery = mu_query_new (store, NULL);
|
||||
|
|
Loading…
Reference in New Issue