mu: Test splicing child containers when there is only one thread

This test reproduces a regression introduced by commit 97101f1f82
("mu: Prune empty container when an only child gets promoted to the
root set").

When the results of a mu-find query contain only a one thread:

$ mu find --threads --fields 'd s' ''
Sat 09 Aug 2014 07:00:00 PM CEST [mu4e] Test Message
  `-> Sat 09 Aug 2014 08:30:00 PM CEST Re: [mu4e] Test Message

... and we narrow down the query in such a way that the root message
gets excluded, then a crash occurs:

$ mu find --threads --fields 'd s' '' date:2014-08-09/20:00..2014-08-09/21:00
**
ERROR:mu-container.c:117:mu_container_append_siblings: assertion failed: (c)
Aborted (core dumped)

Reported-by: Josiah Schwab <jschwab@gmail.com>
This commit is contained in:
Jakub Sitnicki
2014-08-14 07:42:25 +02:00
parent d4be790445
commit ede481d4c0
3 changed files with 88 additions and 0 deletions

1
.gitignore vendored
View File

@ -54,6 +54,7 @@ msg2pdf
test-mu-cmd
test-mu-cmd-cfind
test-mu-contacts
test-mu-container
test-mu-date
test-mu-flags
test-mu-maildir