mirror of https://github.com/djcb/mu.git
* tests/: add tests for issues mentioned in issue #38
(http://code.google.com/p/mu0/issues/detail?id=38). Cannot reproduce the issue though, except when searching for the 'From:' -- this seems to be due to limitation with GMime, if I do: mu view testdir/cur/1305664394.2171_402.cthulhu\!2, get: ------------------------------- From: Mü <testmu@testmu.xx> To: Helmut =?iso-8859-1?q?Kr=F6ger?= <hk@testmu.xxx> Subject: Motörhead Test for issue #38, where apparently searching for accented words in subject, to etc. fails. What about here? Queensrÿche. Mötley Crüe. ------------------------------- They decoding issues are of course very mail-client specific.
This commit is contained in:
parent
8d3fe85652
commit
16180ced2a
|
@ -101,6 +101,7 @@ EXTRA_DIST= \
|
|||
testdir/cur/1220863042.12663_1.mindcrime!2,S \
|
||||
testdir/cur/1220863060.12663_3.mindcrime!2,S \
|
||||
testdir/cur/1283599333.1840_11.cthulhu!2, \
|
||||
testdir/cur/1305664394.2171_402.cthulhu!2, \
|
||||
testdir2/bar/cur/mail1 \
|
||||
testdir2/bar/cur/mail2 \
|
||||
testdir2/bar/cur/mail3 \
|
||||
|
|
|
@ -189,7 +189,7 @@ test_mu_maildir_walk_01 (void)
|
|||
&data);
|
||||
|
||||
g_assert_cmpuint (MU_OK, ==, rv);
|
||||
g_assert_cmpuint (data._file_count, ==, 11);
|
||||
g_assert_cmpuint (data._file_count, ==, 12);
|
||||
g_assert_cmpuint (data._dir_entered,==, 5);
|
||||
g_assert_cmpuint (data._dir_left,==, 5);
|
||||
|
||||
|
@ -220,7 +220,7 @@ test_mu_maildir_walk_02 (void)
|
|||
&data);
|
||||
|
||||
g_assert_cmpuint (MU_OK, ==, rv);
|
||||
g_assert_cmpuint (data._file_count, ==, 7);
|
||||
g_assert_cmpuint (data._file_count, ==, 8);
|
||||
g_assert_cmpuint (data._dir_entered,==, 4);
|
||||
g_assert_cmpuint (data._dir_left,==, 4);
|
||||
|
||||
|
|
|
@ -187,10 +187,10 @@ test_mu_query_04 (void)
|
|||
{ "f:bilbo", 0},
|
||||
{ "baggins", 1},
|
||||
{ "prio:high", 1},
|
||||
{ "prio:normal", 3},
|
||||
{ "prio:normal", 4},
|
||||
{ "prio:h", 1},
|
||||
{ "prio:l", 7},
|
||||
{ "not prio:l", 4}
|
||||
{ "not prio:l", 5},
|
||||
};
|
||||
|
||||
xpath = fill_database ();
|
||||
|
@ -243,6 +243,33 @@ test_mu_query_05 (void)
|
|||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
test_mu_query_06 (void)
|
||||
{
|
||||
gchar *xpath;
|
||||
int i;
|
||||
|
||||
QResults queries[] = {
|
||||
{ "f:mü", 1},
|
||||
{ "s:motörhead", 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[])
|
||||
{
|
||||
|
@ -254,6 +281,7 @@ main (int argc, char *argv[])
|
|||
g_test_add_func ("/mu-query/test-mu-query-03", test_mu_query_03);
|
||||
g_test_add_func ("/mu-query/test-mu-query-04", test_mu_query_04);
|
||||
g_test_add_func ("/mu-query/test-mu-query-05", test_mu_query_05);
|
||||
g_test_add_func ("/mu-query/test-mu-query-06", test_mu_query_06);
|
||||
|
||||
/* g_log_set_handler (NULL, */
|
||||
/* G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION, */
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
From: =?UTF-8?B?TcO8?= <testmu@testmu.xx>
|
||||
To: Helmut =?UTF-8?B?S3LDtmdlcg==?= <hk@testmu.xxx>
|
||||
Subject: =?UTF-8?B?TW90w7ZyaGVhZA==?=
|
||||
User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/24.0 Mule/6.0 (HANACHIRUSATO)
|
||||
MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka")
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
|
||||
Test for issue #38, where apparently searching for accented words in subject,
|
||||
to etc. fails.
|
||||
|
||||
What about here? Queensrÿche. Mötley Crüe.
|
||||
|
||||
|
Loading…
Reference in New Issue