aboutsummaryrefslogtreecommitdiff
path: root/test/T210-raw.sh
AgeCommit message (Collapse)Author
2022-07-30CLI/show: initial support for --duplicate for (raw output only)David Bremner
Add command line argument --duplicate, analogous with that already supported for notmuch-search. Use of a seperate function for _get_filename is mainly a form of documentation at this point. md5sum is of course a weak hash, but it is good enough for this (non-adversarial) test suite use.
2021-03-12test: clean up some extra whitespace.David Bremner
The extra space is mainly just untidy.
2020-07-03test: fix python 3.8.4 related regression in T210-rawDavid Bremner
It seems (at least in 3.8.4~rc1-1 on Debian) that set_content requires at least one line.
2019-05-05cli/show: avoid empty write to stdout in format_part_rawDavid Bremner
Previously if the input was exactly a multiple of the internal buffer size, notmuch would attempt to fwrite nothing to stdout, but still expected fwrite to return 1, causing a failure that looked like this: $ notmuch show --format=raw id:87o96f1cya.fsf@codeaurora.org ...entire message shown as expected.. Error: Write failed $ echo $? 1 To fix the problem don't call fwrite at all when there's nothing to write. Amended by db: add some tests of message sizes likely to cause this problem.
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.
2016-05-19cli: tell how many messages were precisely matched when expected 1 matchTomi Ollila
In case of notmuch reply and notmuch show --part=N it is required that search terms match to one message. If match count was != 1, error message "Error: search term did not match precisely one message" was too vague to explain what happened. By appending (matched <num> messages) to the error message it makes the problem more understandable (e.g when <num> is '0' user reckons the query had a typo in it).
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.