diff options
| author | Jakub Sitnicki <jsitnicki@gmail.com> | 2014-07-15 07:24:21 +0200 |
|---|---|---|
| committer | Jakub Sitnicki <jsitnicki@gmail.com> | 2014-07-15 07:24:21 +0200 |
| commit | cbfe28b8852da65dc1b8db17962cd3816c403606 (patch) | |
| tree | fcb1b1f23fa516cd9e61cfd735868cdd309739c7 /mu | |
| parent | b0357a2d7a1dd01d371b24dc6e1acc14828e1597 (diff) | |
tests: threads: Test if grandchild message promotes its thread
Diffstat (limited to 'mu')
| -rw-r--r-- | mu/tests/test-mu-threads.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/mu/tests/test-mu-threads.c b/mu/tests/test-mu-threads.c index edfa160..4e89d86 100644 --- a/mu/tests/test-mu-threads.c +++ b/mu/tests/test-mu-threads.c @@ -371,6 +371,32 @@ test_mu_threads_sort_child_does_not_promote_thread (void) G_N_ELEMENTS (expected_desc)); } +static void +test_mu_threads_sort_grandchild_promotes_thread (void) +{ + const char *query = "maildir:/sort/grandchild-promotes-thread"; + + const tinfo expected_asc [] = { + { "0", "A@msg.id", "A"}, + { "1", "D@msg.id", "D"}, + { "2", "B@msg.id", "B"}, + { "2:0", "C@msg.id", "C"}, + { "2:0:0", "E@msg.id", "E"}, + }; + const tinfo expected_desc [] = { + { "0", "B@msg.id", "B"}, + { "0:0", "C@msg.id", "C"}, + { "0:0:0", "E@msg.id", "E"}, + { "1", "D@msg.id", "D"}, + { "2", "A@msg.id", "A"}, + }; + + check_sort_by_subject_asc (query, expected_asc, + G_N_ELEMENTS (expected_asc)); + check_sort_by_subject_desc (query, expected_desc, + G_N_ELEMENTS (expected_desc)); +} + int main (int argc, char *argv[]) { @@ -388,6 +414,8 @@ main (int argc, char *argv[]) test_mu_threads_sort_orphan_promotes_thread); g_test_add_func ("/mu-query/test-mu-threads-sort-child-does-not-promote-thread", test_mu_threads_sort_child_does_not_promote_thread); + g_test_add_func ("/mu-query/test-mu-threads-sort-grandchild-promotes-thread", + test_mu_threads_sort_grandchild_promotes_thread); g_log_set_handler (NULL, G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION, |
