* testcases: update for other changes, add some tests
This commit is contained in:
@ -150,6 +150,9 @@ test_mu_find_02 (void)
|
|||||||
search ("bull m:/Foo", 1);
|
search ("bull m:/Foo", 1);
|
||||||
search ("bull flags:a", 1);
|
search ("bull flags:a", 1);
|
||||||
search ("g:x", 0);
|
search ("g:x", 0);
|
||||||
|
search ("flags:encrypted", 0);
|
||||||
|
search ("flags:attach", 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -289,7 +292,6 @@ test_mu_extract_03 (void)
|
|||||||
G_DIR_SEPARATOR,
|
G_DIR_SEPARATOR,
|
||||||
G_DIR_SEPARATOR,
|
G_DIR_SEPARATOR,
|
||||||
G_DIR_SEPARATOR);
|
G_DIR_SEPARATOR);
|
||||||
|
|
||||||
output = NULL;
|
output = NULL;
|
||||||
g_assert (g_spawn_command_line_sync (cmdline, &output, NULL, NULL, NULL));
|
g_assert (g_spawn_command_line_sync (cmdline, &output, NULL, NULL, NULL));
|
||||||
g_assert_cmpstr (output, ==, "");
|
g_assert_cmpstr (output, ==, "");
|
||||||
|
|||||||
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include "test-mu-common.h"
|
#include "test-mu-common.h"
|
||||||
#include "src/mu-msg-str.h"
|
#include "src/mu-msg-str.h"
|
||||||
|
#include "src/mu-msg-prio.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_mu_msg_str_date_01 (void)
|
test_mu_msg_str_date_01 (void)
|
||||||
@ -102,15 +103,15 @@ test_mu_msg_str_size_02 (void)
|
|||||||
static void
|
static void
|
||||||
test_mu_msg_str_prio_01 (void)
|
test_mu_msg_str_prio_01 (void)
|
||||||
{
|
{
|
||||||
g_assert_cmpstr (mu_msg_str_prio(MU_MSG_PRIO_LOW), ==, "low");
|
g_assert_cmpstr(mu_msg_prio_name(MU_MSG_PRIO_LOW), ==, "low");
|
||||||
g_assert_cmpstr (mu_msg_str_prio(MU_MSG_PRIO_NORMAL), ==, "normal");
|
g_assert_cmpstr(mu_msg_prio_name(MU_MSG_PRIO_NORMAL), ==, "normal");
|
||||||
g_assert_cmpstr (mu_msg_str_prio(MU_MSG_PRIO_HIGH), ==, "high");
|
g_assert_cmpstr(mu_msg_prio_name(MU_MSG_PRIO_HIGH), ==, "high");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
ignore_error (const char* log_domain, GLogLevelFlags log_level, const gchar* msg,
|
ignore_error (const char* log_domain, GLogLevelFlags log_level,
|
||||||
gpointer user_data)
|
const gchar* msg, gpointer user_data)
|
||||||
{
|
{
|
||||||
return FALSE; /* don't abort */
|
return FALSE; /* don't abort */
|
||||||
}
|
}
|
||||||
@ -121,7 +122,7 @@ test_mu_msg_str_prio_02 (void)
|
|||||||
{
|
{
|
||||||
/* this must fail */
|
/* this must fail */
|
||||||
g_test_log_set_fatal_handler ((GTestLogFatalFunc)ignore_error, NULL);
|
g_test_log_set_fatal_handler ((GTestLogFatalFunc)ignore_error, NULL);
|
||||||
g_assert_cmpstr (mu_msg_str_prio(666), ==, NULL);
|
g_assert_cmpstr (mu_msg_prio_name(666), ==, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -207,16 +207,16 @@ test_mu_query_05 (void)
|
|||||||
|
|
||||||
xpath = fill_database ();
|
xpath = fill_database ();
|
||||||
g_assert (xpath != NULL);
|
g_assert (xpath != NULL);
|
||||||
|
|
||||||
query = mu_query_new (xpath);
|
query = mu_query_new (xpath);
|
||||||
iter = mu_query_run (query, "fünkÿ", MU_MSG_FIELD_ID_NONE,
|
iter = mu_query_run (query, "fünkÿ", MU_MSG_FIELD_ID_NONE,
|
||||||
FALSE, 1);
|
FALSE, 1);
|
||||||
msg = mu_msg_iter_get_msg (iter);
|
msg = mu_msg_iter_get_msg (iter);
|
||||||
|
|
||||||
g_assert_cmpstr (mu_msg_get_subject(msg),==,
|
g_assert_cmpstr (mu_msg_get_subject(msg),==,
|
||||||
"Greetings from Lothlórien");
|
"Greetings from Lothlórien");
|
||||||
g_assert_cmpstr (mu_msg_get_summary(msg,5),==,
|
g_assert_cmpstr (mu_msg_get_summary(msg,5),==,
|
||||||
"Let's write some fünkÿ text using umlauts. Foo.");
|
"Let's write some fünkÿ text using umlauts. Foo.");
|
||||||
|
|
||||||
mu_msg_destroy (msg);
|
mu_msg_destroy (msg);
|
||||||
mu_msg_iter_destroy (iter);
|
mu_msg_iter_destroy (iter);
|
||||||
|
|||||||
Reference in New Issue
Block a user