mirror of https://github.com/djcb/mu.git
* update test-cases
This commit is contained in:
commit
9d31d8aaca
13
NEWS
13
NEWS
|
@ -1,6 +1,11 @@
|
|||
* NEWS (user visible changes)
|
||||
|
||||
|
||||
|
||||
** Release 0.9.6 < not yet >
|
||||
|
||||
- FreeBSD build fix
|
||||
- fix matching for mu cfind to be as expected
|
||||
-
|
||||
|
||||
** Release 0.9.5 <2011-04-25 Mon>
|
||||
|
||||
- bug fix for infinite loop in Maildir detection
|
||||
|
@ -102,6 +107,4 @@
|
|||
|
||||
# Local Variables:
|
||||
# mode: org; org-startup-folded: nil
|
||||
# End:
|
||||
|
||||
|
||||
# End
|
||||
|
|
|
@ -16,5 +16,13 @@
|
|||
|
||||
include $(top_srcdir)/gtest.mk
|
||||
|
||||
INCLUDES=$(GMIME_CFLAGS) $(GLIB_CFLAGS)
|
||||
AM_CFLAGS=-Wall -Wextra -Wno-unused-parameter -Wdeclaration-after-statement -pedantic
|
||||
|
||||
noinst_PROGRAMS=gmime-test
|
||||
gmime_test_SOURCES=gmime-test.c
|
||||
gmime_test_LDADD=$(GMIME_LIBS) $(GLIB_LIBS)
|
||||
|
||||
|
||||
EXTRA_DIST= \
|
||||
mu-completion.zsh
|
||||
|
|
845
src/mu-msg.c
845
src/mu-msg.c
File diff suppressed because it is too large
Load Diff
|
@ -484,7 +484,13 @@ main (int argc, char *argv[])
|
|||
G_LOG_LEVEL_MASK | G_LOG_LEVEL_WARNING|
|
||||
G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION,
|
||||
(GLogFunc)black_hole, NULL);
|
||||
<<<<<<< HEAD
|
||||
rv = g_test_run ();
|
||||
=======
|
||||
|
||||
rv = g_test_run ();
|
||||
|
||||
>>>>>>> f6ff982e921b60b7afcba19dd85f01d576057f42
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -241,6 +241,31 @@ test_mu_msg_05 (void)
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
test_mu_msg_05 (void)
|
||||
{
|
||||
MuMsg *msg;
|
||||
|
||||
msg = mu_msg_new (MU_TESTMAILDIR
|
||||
"cur/1305664394.2171_402.cthulhu!2,",
|
||||
NULL, NULL);
|
||||
|
||||
g_assert_cmpstr (mu_msg_get_to(msg),
|
||||
==, "Helmut Kröger <hk@testmu.xxx>");
|
||||
g_assert_cmpstr (mu_msg_get_subject(msg),
|
||||
==, "Motörhead");
|
||||
g_assert_cmpstr (mu_msg_get_from(msg),
|
||||
==, "Mü <testmu@testmu.xx>");
|
||||
g_assert_cmpuint (mu_msg_get_prio(msg), /* 'low' */
|
||||
==, MU_MSG_PRIO_NORMAL);
|
||||
g_assert_cmpuint (mu_msg_get_date(msg),
|
||||
==, 0);
|
||||
|
||||
mu_msg_unref (msg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* static gboolean */
|
||||
|
@ -258,6 +283,7 @@ test_mu_msg_05 (void)
|
|||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
int rv;
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
|
||||
|
@ -280,5 +306,31 @@ main (int argc, char *argv[])
|
|||
rv = g_test_run ();
|
||||
|
||||
return rv;
|
||||
=======
|
||||
int rv;
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
|
||||
/* mu_msg_str_date */
|
||||
g_test_add_func ("/mu-msg/mu-msg-01",
|
||||
test_mu_msg_01);
|
||||
g_test_add_func ("/mu-msg/mu-msg-02",
|
||||
test_mu_msg_02);
|
||||
g_test_add_func ("/mu-msg/mu-msg-03",
|
||||
test_mu_msg_03);
|
||||
g_test_add_func ("/mu-msg/mu-msg-04",
|
||||
test_mu_msg_04);
|
||||
g_test_add_func ("/mu-msg/mu-msg-05",
|
||||
test_mu_msg_05);
|
||||
|
||||
g_log_set_handler (NULL,
|
||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION,
|
||||
(GLogFunc)black_hole, NULL);
|
||||
|
||||
mu_msg_gmime_init ();
|
||||
rv = g_test_run ();
|
||||
mu_msg_gmime_uninit ();
|
||||
|
||||
return rv;
|
||||
>>>>>>> f6ff982e921b60b7afcba19dd85f01d576057f42
|
||||
|
||||
}
|
||||
|
|
|
@ -268,6 +268,34 @@ test_mu_query_06 (void)
|
|||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
test_mu_query_06 (void)
|
||||
{
|
||||
gchar *xpath;
|
||||
int i;
|
||||
|
||||
QResults queries[] = {
|
||||
{ "f:mü", 1},
|
||||
{ "s:motörhead", 1},
|
||||
{ "t:Helmut", 1},
|
||||
{ "t:Kröger", 1},
|
||||
{ "s:MotorHeäD", 1},
|
||||
{ "queensryche", 1},
|
||||
{ "Queensrÿche", 1},
|
||||
};
|
||||
|
||||
xpath = fill_database ();
|
||||
g_assert (xpath != NULL);
|
||||
|
||||
for (i = 0; i != G_N_ELEMENTS(queries); ++i)
|
||||
g_assert_cmpuint (run_and_count_matches (xpath, queries[i].query),
|
||||
==, queries[i].count);
|
||||
g_free (xpath);
|
||||
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue