test: support testing notmuch as installed 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.
test: treat undefined feature variables as 0 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.
test: use $(dirname "$0") for sourcing test-lib.sh Don't assume the tests are always run from within the source tree.
test: require test_begin_subtest before test_expect_success Unify the subtests by requiring test_begin_subtest before test_expect_success. (Similar change for test_expect_code will follow.) 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.
test: make script exit (1) if it "fails" to source (.) a file 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.
test: redirect man output to /dev/null In the case the these tests fail, they generate a bunch of output; this output is not very interesting because it is just the successful output of a man page. It does however make it hard to see what tests are actually failing, even with NOTMUCH_TEST_QUIET
test: use sh.config for configuration
test: conditionally test help system depending on configured support If neither sphinx nor rst2man is available, the notmuch man pages will not be available. Take this into account in the help system test.
test: renamed test scripts to format T\d\d\d-name.sh 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.