aboutsummaryrefslogtreecommitdiff
path: root/test/T560-lib-error.sh
AgeCommit message (Collapse)Author
2017-03-22lib: replace deprecated n_q_search_messages with status returning versionDavid Bremner
This function was deprecated in notmuch 0.21. We re-use the name for a status returning version, and deprecate the _st name.
2017-03-09test: require test_begin_subtest before test_expect_successJani Nikula
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.
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.
2016-04-12test: improve error handling in lib-error testsDavid Bremner
There is at least one bug fixed here (missing parameter to printf), even if exiting via segfault is considered OK.
2016-01-26test: refactor directory name sanitizationDavid Bremner
test_C and notmuch_search_files_sanitize were giving different output on the same path, which is not technically wrong, but slightly confusing.
2015-09-04test: move backup_database and restore_database to libraryDavid Bremner
The plan is to re-use them in testing the same errors from the CLI
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-06-12lib: reject relative paths in n_d_{create,open}_verboseDavid Bremner
There are many places in the notmuch code where the path is assumed to be absolute. If someone (TM) wants a project, one could remove these assumptions. In the mean time, prevent users from shooting themselves in the foot. Update test suite mark tests for this error as no longer broken, and also convert some tests that used relative paths for nonexistent directories.
2015-06-12lib: add NOTMUCH_STATUS_PATH_ERRORDavid Bremner
The difference with FILE_ERROR is that this is for things that are wrong with the path before looking at the disk. Add some 3 tests; two broken as a reminder to actually use this new code.
2015-04-08test: move nonexistent directory to something under notmuch's control.David Bremner
Apparently some systems actually have a directory called /nonexist[ae]nt. It's hard to fathom a good reason for that, but oh well. As long as we don't create such a directory inside the notmuch source tree, the new version should be more robust.
2015-04-08test: be consistent about spelling `nonexistent'David Bremner
Apparently most of the misspellings are my fault.
2015-03-29test: make one error output test more robust.David Bremner
Since notmuch_database_status_string can return NULL, passing it directly to fputs is not a good idea.
2015-03-29test: add more error reporting testsDavid Bremner
This second half of the error reporting tests actually uses the function notmuch_database_status_string to retrieve the last logged error
2015-03-29lib: replace almost all fprintfs in library with _n_d_logDavid Bremner
This is not supposed to change any functionality from an end user point of view. Note that it will eliminate some output to stderr. The query debugging output is left as is; it doesn't really fit with the current primitive logging model. The remaining "bad" fprintf will need an internal API change.
2015-03-29test: add error reporting testsDavid Bremner
This first half of the tests is all that don't need to retrieve the the error string explicitly from the notmuch database structure.