aboutsummaryrefslogtreecommitdiff
path: root/test/T150-tagging.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.
2023-01-05test: mark some tests as broken when run as root.David Bremner
File permission errors e.g., are hard to trigger as root.
2021-09-04CLI/tag: enable sexp queriesDavid Bremner
We have to rewrite _optimize_tag_query here because it is generating a query string in the infix Xapian syntax. Luckily this is easy to do with the sexp query syntax.
2021-03-12test: clean up some extra whitespace.David Bremner
The extra space is mainly just untidy.
2020-08-01test: drop use of db_endingDavid Bremner
This will allow the dropping of the test for the default ending from configure.
2018-08-29test/tag: add test for updating during batch tag operationsDavid Bremner
This clarifies that the breakage seen with Xapian 1.4.6 does not have to do with "funny" tags. This test is "known broken", but only with xapian 1.4.6, and there's curently no convenient way to mark that.
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-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.
2016-05-25CLI: add optional config data to dump output.David Bremner
Note that it changes the default dump output format, but doesn't break existing notmuch-restore. It might break user scripts though.
2016-04-12test: cope with glass backend file naming variationsDavid Bremner
In several places in the test suite we intentionally corrupt the Xapian database in order to test error handling. This corruption is specific to the on-disk organization of the database, and that changed with the glass backend. We use the previously computed default backend to make the tests adapt to changing names.
2015-11-19test: Tests for combining --batch and --remove-allDaniel Schoepe
This patch adds some tests for combining --remove-all with --batch or --input when calling notmuch-tag.
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.
2015-03-15test: Add two tests for error output from notmuch_database_openDavid Bremner
This is arguably testing the same thing twice, but in the brave new future where we don't use printf anymore, each subcommand will be responsible for handling the output on it's own.
2014-07-16dump: make dump take Xapian write lockMark Walters
Dump currently only takes the read lock. Xapian can cope with some changes while maintaining a read snapshot but with more changes it fails. Currently notmuch just gives a xapian error. To avoid this we take the write lock when dumping. This prevents other notmuch processes from modifying the xapian database preventing this error. Discussion with Olly on irc indicates that this is currently the best solution: in xapian trunk there may be better possibilities using snapshots but they need to make it to a release and propogate out to users before we can switch approach. Finally, this breaks one use case: pipelines of the form notmuch dump | ... | notmuch restore According to Olly this is already very fragile: it will only work on small databases. One of the tests relies on this behaviour so fix that to store the dump rather than use a pipe.
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.