From fa0882ed90261ffd8ed9e2241269ab42abe6b497 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Wed, 18 May 2011 21:21:10 +0300 Subject: [PATCH] * test-mu-{cmd,msg,query}.c: update (c) year --- src/tests/test-mu-cmd.c | 4 +++- src/tests/test-mu-msg.c | 34 ++++++++++++++++++++++++++++++++-- src/tests/test-mu-query.c | 2 +- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/tests/test-mu-cmd.c b/src/tests/test-mu-cmd.c index 0e8d2f5e..a1ae2abb 100644 --- a/src/tests/test-mu-cmd.c +++ b/src/tests/test-mu-cmd.c @@ -1,5 +1,5 @@ /* -** Copyright (C) 2008-2010 Dirk-Jan C. Binnema +** Copyright (C) 2008-2011 Dirk-Jan C. Binnema ** ** This program is free software; you can redistribute it and/or modify it ** under the terms of the GNU General Public License as published by the @@ -409,6 +409,8 @@ test_mu_view_01 (void) } + + static void test_mu_mkdir_01 (void) { diff --git a/src/tests/test-mu-msg.c b/src/tests/test-mu-msg.c index dabc9d7a..cbaedfca 100644 --- a/src/tests/test-mu-msg.c +++ b/src/tests/test-mu-msg.c @@ -1,5 +1,5 @@ /* -** Copyright (C) 2008-2010 Dirk-Jan C. Binnema +** Copyright (C) 2008-2011 Dirk-Jan C. Binnema ** ** This program is free software; you can redistribute it and/or modify it ** under the terms of the GNU General Public License as published by the @@ -215,6 +215,31 @@ test_mu_msg_04 (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 "); + g_assert_cmpstr (mu_msg_get_subject(msg), + ==, "Motörhead"); + g_assert_cmpstr (mu_msg_get_from(msg), + ==, "Mü "); + 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 */ /* ignore_error (const char* log_domain, GLogLevelFlags log_level, const gchar* msg, */ @@ -225,6 +250,9 @@ test_mu_msg_04 (void) + + + int main (int argc, char *argv[]) { @@ -240,7 +268,9 @@ main (int argc, char *argv[]) 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); diff --git a/src/tests/test-mu-query.c b/src/tests/test-mu-query.c index 9b4ffb9a..90031ea3 100644 --- a/src/tests/test-mu-query.c +++ b/src/tests/test-mu-query.c @@ -1,5 +1,5 @@ /* -** Copyright (C) 2008-2010 Dirk-Jan C. Binnema +** Copyright (C) 2008-2011 Dirk-Jan C. Binnema ** ** This program is free software; you can redistribute it and/or modify it ** under the terms of the GNU General Public License as published by the