aboutsummaryrefslogtreecommitdiff
path: root/test/T160-json.sh
AgeCommit message (Collapse)Author
2023-07-21test: support testing notmuch as installedDavid Bremner
We put some effort into testing the built copy rather than some installed copy. On the other hand for people like packagers, testing the installed copy is also of interest. When NOTMUCH_TEST_INSTALLED is set to a nonempty value, tests do not require a built notmuch tree or running configure. Some of the tests marked as broken when running against installed notmuch are probably fixable.
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/show: support --duplicate for structured outputDavid Bremner
This introduces a new mandatory key for message structures, namely "duplicate". Per convention in devel/schemata this does _not_ increase the format version. This means that clients are responsible for checking that it exists, and not crashing if it does not. The main functional change is teaching mime_node_open to understand a 'duplicate' argument. Support for --duplicate in notmuch-reply would make sense, but we defer it to a later commit.
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.
2022-01-18CLI: print extra headers in structured outputDavid Bremner
This is based on a patch from Johan Parin [1], which is in turn responding to a bug report / feature requiest from Jan Malkhovski. The update to the structured output documented in schemata is intended to be upward compatible, so the format version stays the same [1]: id:20191116162723.18343-1-johan.parin@gmail.com [2]: id:87h8sdemnr.fsf@oxij.org
2021-06-03test: source $NOTMUCH_SRCDIR/test/test-lib-emacs.shTomi Ollila
Sourcing test-lib.sh will cd to TMP_DIRECTORY, so relative path in $0 will not work in previous version . $(dirname "$0")/test-lib-emacs.sh Now individual test scripts -- e.g. ./test/T310-emacs.sh will work.
2021-05-17test: split emacs functionality to its own fileFelipe Contreras
This way it's easier to identify the tests that do require emacs stuff. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2020-06-26test: mark two tests broken on machines with 32 bit time_tDavid Bremner
I haven't traced the code path as exhaustively for the SMIME test, but the expiry date in question is larger then representable in a signed 32 bit integer.
2020-02-13sprinter: change integer method to use int64_tPeter Wang
In particular, timestamps beyond 2038 could overflow the sprinter interface on systems where time_t is 64-bit but 'int' is a signed 32-bit integer type.
2020-02-13test: add known broken test with timestamp beyond 2038Peter Wang
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
2017-10-20test: use source and build paths in T160-json.sh and T170-sexp.shJani Nikula
Make a distinction between source and build directories.
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-08-01lib: index message files with duplicate message-idsDavid Bremner
The corresponding xapian document just gets more terms added to it, but this doesn't seem to break anything. Values on the other hand get overwritten, which is a bit annoying, but arguably it is not worse to take the values (from, subject, date) from the last file indexed rather than the first.
2017-03-09test: require test_begin_subtest before test_expect_codeJani Nikula
Unify the subtests by requiring test_begin_subtest before test_expect_code. (Similar change for test_expect_success has already been done.) This increases clarity in the test scripts by having a separate line for the start of the subtest with the heading, and makes it possible to simplify the test infrastructure by making all subtests similar.
2017-02-28cli/show: add content-disposition to structured output message partsJani Nikula
Help the clients decide how to display parts. Test updates by Mark Walters <markwalters1009@gmail.com>. One more test fix by db
2017-02-26test: test format version difference between v2 and v3Jani Nikula
Schemata v3 changed message filename field to a list. Test both versions 2 and 3.
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.
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.