aboutsummaryrefslogtreecommitdiff
path: root/test/T220-reply.sh
AgeCommit message (Collapse)Author
2023-07-21test: treat undefined feature variables as 0David Bremner
When running the test suite without building first, it is desirable to have the tests consider these variables being undefined as equivalent to the feature not being present, and in particular for the tests not to generate errors.
2022-07-30CLI/reply: support --duplicate argumentDavid Bremner
We want the reply used to match that shown e.g. in the emacs interface. As a first step provide that functionality on the command line. Schema does not need updating as the duplicate key was already present (with a constant value of 1).
2022-07-05test: use notmuch_json_show_sanitize more placesDavid Bremner
This makes the tests more robust against changing output formats, by allowing us to centralize fixes in the sanitization function. It is not appropriate for all cases, in particular it is unneeded when using test_json_nodes, and unhelpful when testing filenames.
2021-09-04CLI/{count, dump, reindex, reply, show}: enable sexp queriesDavid Bremner
The change in each case is to call notmuch_query_create_with_syntax, relying on the already inherited shared options. As a bonus we get improved error handling from the new query creation API. The remaining subcommand is 'tag', which is a bit trickier.
2021-08-29lib: consider all instances of Delivered-To headerHannu Hartikainen
When using notmuch-reply and guessing the From: address from Delivered-To headers, I had the wrong address chosen today. This was because the messages from the notmuch list contain these headers in this order: Delivered-To: hannu.hartikainen@gmail.com ... Delivered-To: hannu@hrtk.in In my .notmuch-config I have the following configuration: primary_email=hannu@hrtk.in other_email=hannu.hartikainen@gmail.com;... Before this change, notmuch-reply would guess From: @gmail.com because that is the first Delivered-To header present. After the change, the primary address is chosen as I would expect.
2021-08-29reply: add test for multiple Delivered-To headersHannu Hartikainen
Add a known broken subtest for guessing From: correctly when there are multiple Delivered-To: headers. The address configured as primary_email should get picked.
2019-05-26cli/show: emit new whole-message crypto status outputDaniel Kahn Gillmor
This allows MUAs that don't want to think about per-mime-part cryptographic status to have a simple high-level overview of the message's cryptographic state. Sensibly structured encrypted and/or signed messages will work fine with this. The only requirement for the simplest encryption + signing is that the message have all of its encryption and signing protection (the "cryptographic envelope") in a contiguous set of MIME layers at the very outside of the message itself. This is because messages with some subparts signed or encrypted, but with other subparts with no cryptographic protection is very difficult to reason about, and even harder for the user to make sense of or work with. For further characterization of the Cryptographic Envelope and some of the usability tradeoffs, see here: https://dkg.fifthhorseman.net/blog/e-mail-cryptography.html#cryptographic-envelope
2018-12-07reply: Include sender as recipient if they were the original recipientDavid Edmondson
When generating a reply message, if the user was the originator and only recipient of the original message, include the user as a recipient of the reply.
2017-10-20test: use $(dirname "$0") for sourcing test-lib.shJani Nikula
Don't assume the tests are always run from within the source tree.
2017-07-14Add additional munged reply-to testsDaniel Kahn Gillmor
The reply-to munging code might behave differently whether there's an exact match on the strings or not, or whether the string is a raw addr-spec instead of an name-addr. These tests cover those variations (i also had to tweak json output further below when this new test was added).
2017-07-14Ensure that "notmuch reply" succeeds during testing.Daniel Kahn Gillmor
In some (bad!) cases, "notmuch reply" might fail, or might even segfault. If this happens, it indicates a bug, and the test suite should notice it.
2017-02-26cli/show: list all filenames of a message in the formatted outputJani Nikula
Instead of just having the first filename for the message, list all duplicate filenames of the message as a list in the formatted outputs. This bumps the format version to 3.
2016-09-17cli/reply: return internet address list from get header funcsJani Nikula
Pass in GMimeMessage to simplify To/Cc/Bcc headers. We'll eventually remove the notmuch message passing altogether, but keep both for now to not make too big changes at once. Getting the headers from GMimeMessage using GMime functions fixes the error on duplicate Cc headers reported by Daniel Kahn Gillmor <dkg@fifthhorseman.net> in id:87d1ngv95p.fsf@alice.fifthhorseman.net. Get rid of an intermediate function. The small annoyance is the ownership differences in the address lists.
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.
2015-08-07test: make script exit (1) if it "fails" to source (.) a fileTomi Ollila
The files (test) scripts source (with builtin command `.`) provides information which the scripts depend, and without the `source` to succeed allowing script to continue may lead to dangerous situations (e.g. rm -rf "${undefined_variable}"/*). At the end of all source (.) lines construct ' || exit 1' was added; In our case the script script will exit if it cannot find (or read) the file to be sourced. Additionally script would also exits if the last command of the sourced file exited nonzero.
2014-01-13test: renamed test scripts to format T\d\d\d-name.shTomi Ollila
All test scripts to be executed are now named as T\d\d\d-name.sh, numers in increments of 10. This eases adding new tests and developers to see which are test scripts that are executed by test suite and in which order.