* test cases: update for mu-msg / mu-runtime change
This commit is contained in:
@ -314,21 +314,26 @@ test_mu_extract_03 (void)
|
|||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
g_test_init (&argc, &argv, NULL);
|
int rv;
|
||||||
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
g_test_add_func ("/mu-cmd/test-mu-index", test_mu_index);
|
g_test_add_func ("/mu-cmd/test-mu-index", test_mu_index);
|
||||||
g_test_add_func ("/mu-cmd/test-mu-find-01", test_mu_find_01);
|
g_test_add_func ("/mu-cmd/test-mu-find-01", test_mu_find_01);
|
||||||
g_test_add_func ("/mu-cmd/test-mu-find-02", test_mu_find_02);
|
g_test_add_func ("/mu-cmd/test-mu-find-02", test_mu_find_02);
|
||||||
g_test_add_func ("/mu-cmd/test-mu-find-03", test_mu_find_03);
|
g_test_add_func ("/mu-cmd/test-mu-find-03", test_mu_find_03);
|
||||||
g_test_add_func ("/mu-cmd/test-mu-find-04", test_mu_find_04);
|
g_test_add_func ("/mu-cmd/test-mu-find-04", test_mu_find_04);
|
||||||
g_test_add_func ("/mu-cmd/test-mu-extract-01", test_mu_extract_01);
|
g_test_add_func ("/mu-cmd/test-mu-extract-01", test_mu_extract_01);
|
||||||
g_test_add_func ("/mu-cmd/test-mu-extract-02", test_mu_extract_02);
|
g_test_add_func ("/mu-cmd/test-mu-extract-02", test_mu_extract_02);
|
||||||
g_test_add_func ("/mu-cmd/test-mu-extract-03", test_mu_extract_03);
|
g_test_add_func ("/mu-cmd/test-mu-extract-03", test_mu_extract_03);
|
||||||
|
|
||||||
g_log_set_handler (NULL,
|
g_log_set_handler (NULL,
|
||||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION,
|
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION,
|
||||||
(GLogFunc)black_hole, NULL);
|
(GLogFunc)black_hole, NULL);
|
||||||
|
|
||||||
return g_test_run ();
|
mu_msg_gmime_init ();
|
||||||
|
rv = g_test_run ();
|
||||||
|
mu_msg_gmime_uninit();
|
||||||
|
|
||||||
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -228,21 +228,27 @@ test_mu_msg_04 (void)
|
|||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
g_test_init (&argc, &argv, NULL);
|
int rv;
|
||||||
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
/* mu_msg_str_date */
|
/* mu_msg_str_date */
|
||||||
g_test_add_func ("/mu-msg/mu-msg-01",
|
g_test_add_func ("/mu-msg/mu-msg-01",
|
||||||
test_mu_msg_01);
|
test_mu_msg_01);
|
||||||
g_test_add_func ("/mu-msg/mu-msg-02",
|
g_test_add_func ("/mu-msg/mu-msg-02",
|
||||||
test_mu_msg_02);
|
test_mu_msg_02);
|
||||||
g_test_add_func ("/mu-msg/mu-msg-03",
|
g_test_add_func ("/mu-msg/mu-msg-03",
|
||||||
test_mu_msg_03);
|
test_mu_msg_03);
|
||||||
g_test_add_func ("/mu-msg/mu-msg-04",
|
g_test_add_func ("/mu-msg/mu-msg-04",
|
||||||
test_mu_msg_04);
|
test_mu_msg_04);
|
||||||
|
|
||||||
g_log_set_handler (NULL,
|
g_log_set_handler (NULL,
|
||||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION,
|
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION,
|
||||||
(GLogFunc)black_hole, NULL);
|
(GLogFunc)black_hole, NULL);
|
||||||
|
|
||||||
return g_test_run ();
|
mu_msg_gmime_init ();
|
||||||
|
rv = g_test_run ();
|
||||||
|
mu_msg_gmime_uninit ();
|
||||||
|
|
||||||
|
return rv;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -107,12 +107,15 @@ test_mu_query_01 (void)
|
|||||||
{ "funky", 1 },
|
{ "funky", 1 },
|
||||||
{ "fünkÿ", 1 },
|
{ "fünkÿ", 1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
xpath = fill_database ();
|
xpath = fill_database ();
|
||||||
g_assert (xpath != NULL);
|
g_assert (xpath != NULL);
|
||||||
|
|
||||||
for (i = 0; i != G_N_ELEMENTS(queries); ++i)
|
for (i = 0; i != G_N_ELEMENTS(queries); ++i)
|
||||||
g_assert_cmpuint (run_and_count_matches (xpath, queries[i].query),
|
g_assert_cmpuint (run_and_count_matches (xpath, queries[i].query),
|
||||||
==, queries[i].count);
|
==, queries[i].count);
|
||||||
|
|
||||||
g_free (xpath);
|
g_free (xpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,8 +236,9 @@ test_mu_query_05 (void)
|
|||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
g_test_init (&argc, &argv, NULL);
|
int rv;
|
||||||
|
|
||||||
|
g_test_init (&argc, &argv, NULL);
|
||||||
g_test_add_func ("/mu-query/test-mu-query-01", test_mu_query_01);
|
g_test_add_func ("/mu-query/test-mu-query-01", test_mu_query_01);
|
||||||
g_test_add_func ("/mu-query/test-mu-query-02", test_mu_query_02);
|
g_test_add_func ("/mu-query/test-mu-query-02", test_mu_query_02);
|
||||||
g_test_add_func ("/mu-query/test-mu-query-03", test_mu_query_03);
|
g_test_add_func ("/mu-query/test-mu-query-03", test_mu_query_03);
|
||||||
@ -244,7 +248,11 @@ main (int argc, char *argv[])
|
|||||||
g_log_set_handler (NULL,
|
g_log_set_handler (NULL,
|
||||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION,
|
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION,
|
||||||
(GLogFunc)black_hole, NULL);
|
(GLogFunc)black_hole, NULL);
|
||||||
|
|
||||||
|
mu_msg_gmime_init ();
|
||||||
|
rv = g_test_run ();
|
||||||
|
mu_msg_gmime_uninit ();
|
||||||
|
|
||||||
return g_test_run ();
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user