From 2e717a92f9872e89f5b983b39e4450f3133a430c 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 | 2 ++ src/tests/test-mu-msg.c | 34 ++++++++++++++++++++++++++++++++-- src/tests/test-mu-query.c | 2 +- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/tests/test-mu-cmd.c b/src/tests/test-mu-cmd.c index c6fef046..fc84a62a 100644 --- a/src/tests/test-mu-cmd.c +++ b/src/tests/test-mu-cmd.c @@ -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 9ff03edf..7ee3bef1 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 @@ -214,6 +214,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, */ @@ -224,6 +249,9 @@ test_mu_msg_04 (void) + + + int main (int argc, char *argv[]) { @@ -239,7 +267,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 a395f24f..a501e00a 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