test: add known broken test for reply to message with multiple Cc headers
authorJani Nikula <jani@nikula.org>
Tue, 13 Sep 2016 17:14:09 +0000 (20:14 +0300)
committerDavid Bremner <david@tethera.net>
Sat, 17 Sep 2016 11:41:29 +0000 (08:41 -0300)
commit36416c74e09d07fe3dfff79900171f15c4671412
treecad9b05c05353435c79842a0152a3ca8335ce954
parent971cdc72cdb80f060193bc0914dc9badcc29696b
test: add known broken test for reply to message with multiple Cc headers

As Daniel Kahn Gillmor <dkg@fifthhorseman.net> reports in
id:87d1ngv95p.fsf@alice.fifthhorseman.net, notmuch show combines
multiple Cc: fields into one, while notmuch reply does not. While such
messages are in violation of RFC 5322, it would be reasonable to
expect notmuch to be consistent. Add a known broken test to document
this expectation.

This also starts a new "broken" corpus for messages which are broken.

Details:

The original message is formatted using the message printing in
notmuch-show.c. For Cc:, it uses g_mime_message_get_recipients(),
which apparently combines all Cc: fields into one internally.

The addresses in the reply headers, OTOH, are based on headers queried
through libnotmuch. It boils down to g_mime_object_get_header() in
lib/message-file.c, which returns only the first occurence of header.
test/T220-reply.sh
test/corpora/README [new file with mode: 0644]
test/corpora/broken/broken-cc [new file with mode: 0644]