update for lib/utils split

Update sources with the new paths
This commit is contained in:
Dirk-Jan C. Binnema
2019-12-16 21:44:35 +02:00
parent e5337e7658
commit b55e191421
44 changed files with 237 additions and 261 deletions

View File

@ -30,11 +30,7 @@
#include <locale.h>
#include "test-mu-common.h"
#include "mu-str.h"
#include "mu-msg-prio.h"
static void
@ -76,34 +72,6 @@ test_mu_str_size_02 (void)
static void
test_mu_str_prio_01 (void)
{
g_assert_cmpstr(mu_msg_prio_name(MU_MSG_PRIO_LOW), ==, "low");
g_assert_cmpstr(mu_msg_prio_name(MU_MSG_PRIO_NORMAL), ==, "normal");
g_assert_cmpstr(mu_msg_prio_name(MU_MSG_PRIO_HIGH), ==, "high");
}
static gboolean
ignore_error (const char* log_domain, GLogLevelFlags log_level,
const gchar* msg, gpointer user_data)
{
return FALSE; /* don't abort */
}
static void
test_mu_str_prio_02 (void)
{
/* this must fail */
g_test_log_set_fatal_handler ((GTestLogFatalFunc)ignore_error, NULL);
g_assert_cmpstr (mu_msg_prio_name(666), ==, NULL);
}
static void
test_parse_arglist (void)
{
@ -158,25 +126,6 @@ test_mu_str_esc_to_list (void)
}
static void
test_mu_str_display_contact (void)
{
int i;
struct {
const char* word;
const char* disp;
} words [] = {
{ "\"Foo Bar\" <aap@noot.mies>", "Foo Bar"},
{ "Foo Bar <aap@noot.mies>", "Foo Bar" },
{ "<aap@noot.mies>", "aap@noot.mies" },
{ "foo@bar.nl", "foo@bar.nl" }
};
for (i = 0; i != G_N_ELEMENTS(words); ++i)
g_assert_cmpstr (mu_str_display_contact_s (words[i].word), ==,
words[i].disp);
}
static void
assert_cmplst (GSList *lst, const char *items[])
@ -333,16 +282,6 @@ main (int argc, char *argv[])
g_test_add_func ("/mu-str/mu-str-size-02",
test_mu_str_size_02);
/* mu_str_prio */
g_test_add_func ("/mu-str/mu-str-prio-01",
test_mu_str_prio_01);
g_test_add_func ("/mu-str/mu-str-prio-02",
test_mu_str_prio_02);
g_test_add_func ("/mu-str/mu-str-display_contact",
test_mu_str_display_contact);
g_test_add_func ("/mu-str/mu-str-from-list",
test_mu_str_from_list);
g_test_add_func ("/mu-str/mu-str-to-list",
@ -362,13 +301,6 @@ main (int argc, char *argv[])
g_test_add_func ("/mu-str/mu_str_remove_ctrl_in_place",
test_mu_str_remove_ctrl_in_place);
/* FIXME: add tests for mu_str_flags; but note the
* function simply calls mu_msg_field_str */
g_log_set_handler (NULL,
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL|
G_LOG_FLAG_RECURSION,
(GLogFunc)black_hole, NULL);
return g_test_run ();
}