summaryrefslogtreecommitdiff
path: root/test/corpora
AgeCommit message (Collapse)Author
2019-05-29test: try indexing nested messages and protected headersDaniel Kahn Gillmor
We want to make sure that internally-forwarded messages don't end up "bubbling up" when they aren't actually the cryptographic payload. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29test: protected headers should work when both encrypted and signed.Daniel Kahn Gillmor
Up to this point, we've tested protected headers on messages that have either been encrypted or signed, but not both. This adds a couple tests of signed+encrypted messages, one where the subject line is masked (outside subject line is "Subject Unavailable") and another where it is not (outside Subject: matches inner Subject:) See the discussion at https://dkg.fifthhorseman.net/blog/e-mail-cryptography.html#protected-headers for more details about the nuances between signed, stripped, and stubbed headers. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29test: show cryptographic envelope information for signed mailsDaniel Kahn Gillmor
Make sure that we emit the correct cryptographic envelope status for cleartext signed messages. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29test: add test for missing external subjectDaniel Kahn Gillmor
Adding another test to ensure that we handle protected headers gracefully when no external subject is present. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29cli/show: add tests for viewing protected headersDaniel Kahn Gillmor
Here we add several variant e-mail messages, some of which have correctly-structured protected headers, and some of which do not. The goal of the tests is to ensure that the right protected subjects get reported. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-10emacs: test notmuch-show during message decryptionDaniel Kahn Gillmor
We did not have a test showing what message decryption looks like within notmuch-emacs. This change gives us a baseline for future work on the notmuch-emacs interface. This differs from previous revisions of this patch in that it should be insensitive to the order in which the local filesystem readdir()s the underlying maildir. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2018-09-06test: add known broken test for good In-Reply-To / bad ReferencesDavid Bremner
The current scheme of choosing the replyto (i.e. the default parent for threading purposes) does not work well for mailers that put the oldest Reference last.
2018-09-06test: start threading test corpusDavid Bremner
There are 3 threads here, two synthetic, and one anonymized one using data from Gregor. They test various aspects of thread ordering/construction in the presence of replies to ghost messages.
2018-04-20test: two new messages for the 'broken' corpusDavid Bremner
These have an 'In-Reply-To' loop, which currently confuses "notmuch new".
2017-12-04test/corpora: add an encrypted message for index decryption testsDaniel Kahn Gillmor
2017-04-20test: add known broken test for indexing htmlDavid Bremner
'quite' on IRC reported that notmuch new was grinding to a halt during initial indexing, and we eventually narrowed the problem down to some html parts with large embedded images. These cause the number of terms added to the Xapian database to explode (the first 400 messages generated 4.6M unique terms), and of course the resulting terms are not much use for searching. The second test is sanity check for any "improved" indexing of HTML.
2017-04-13test: add 'lkml' corpusDavid Bremner
These 210 messages are in several long threads, which is good for testing our threading code, and may be useful just as a larger test corpus in the future.
2016-09-17test: add known broken test for reply to message with multiple Cc headersJani Nikula
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.
2016-09-17test: make it possible to have multiple corporaJani Nikula
We largely use the corpus under test/corpus for testing. Unfortunately, many of our tests have grown to depend on having exactly this set of messages, making it hard to add new message files for testing specific cases. We do use a lot of add_message from within the tests, but it's not possible to use that for adding broken messages, and adding several messages at once can get unwieldy. Move the basic corpus under tests/corpora/default, and make it possible to add new, independent corpora along its side. This means tons of renames with a few tweaks to add_email_corpus function in test-lib.sh to let tests specify which corpus to use.