diff options
| author | Jani Nikula <jani@nikula.org> | 2016-09-13 20:14:09 +0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2016-09-17 08:41:29 -0300 |
| commit | 36416c74e09d07fe3dfff79900171f15c4671412 (patch) | |
| tree | cad9b05c05353435c79842a0152a3ca8335ce954 /test/corpora | |
| parent | 971cdc72cdb80f060193bc0914dc9badcc29696b (diff) | |
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.
Diffstat (limited to 'test/corpora')
| -rw-r--r-- | test/corpora/README | 11 | ||||
| -rw-r--r-- | test/corpora/broken/broken-cc | 9 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/corpora/README b/test/corpora/README new file mode 100644 index 00000000..77c48e6e --- /dev/null +++ b/test/corpora/README @@ -0,0 +1,11 @@ +This directory contains email corpora for testing. + +default + The default corpus is based on about 50 messages from early in the + history of the notmuch mailing list, which allows for reliably + testing commands that need to operate on a not-totally-trivial + number of messages. + +broken + The broken corpus contains messages that are broken and/or RFC + non-compliant, ensuring we deal with them in a sane way. diff --git a/test/corpora/broken/broken-cc b/test/corpora/broken/broken-cc new file mode 100644 index 00000000..57ae9ba9 --- /dev/null +++ b/test/corpora/broken/broken-cc @@ -0,0 +1,9 @@ +From: Alice <alice@example.org> +To: Daniel <daniel@example.org> +Cc: Bob <bob@example.org> +Subject: wowsers! +cc: Charles <charles@example.org> +Message-Id: <multiple-cc@example.org> +Date: Thu, 16 Jun 2016 22:14:41 -0400 + +Note the Cc: and cc: headers. |
