| Age | Commit message (Collapse) | Author |
|
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.
|
|
The call to delete_document can throw exceptions (and can happen in
practice [1]), so catch the exception and extract the error
message. As a side effect, also move the call to _n_m_has_term inside
the try/catch. This should not change anything as that function
already traps any Xapian exceptions.
[1]: id:wwuk039sk2p.fsf@chaotikum.eu
|
|
In [1], Thomas Schneider reported an uncaught Xapian exception when
running out of disk space. We generate the same exception via database
corruption.
[1]: id:wwuk039sk2p.fsf@chaotikum.eu
|
|
The database needs to be writable because the list of stored file
names will change in general.
|
|
In order for a database to actually be writeable, it must be the case that it
is open, not just the correct type of Xapian object. By explicitely
checking, we are able to provide better error reporting, in particular
for the previously broken test in T566-lib-message.
|
|
The closed database case should fail gracefully, but currently it
segfaults.
|
|
Use a closed database to force throwing a Xapian exception. Leave the
check vague to accomodate a potential explicit check for open database.
|
|
Unfortunately we can't differentiate between the two distinct error
conditions for Document::remove_term.
|
|
Some code movement is needed to make sure the cache is only
invalidated when the Xapian operation succeeds.
|
|
We need to do it some day, and it is a bit annoying to read
deprecation messages in broken tests.
|
|
This removes some redudant includes, and will also make it easier to
introduce "#define _GNU_SOURCE", which must come before all system
includes.
|
|
The extra space is mainly just untidy.
|
|
Closing the database after the iterator is created is not a problem.
|
|
This allows finer control over when to close the database.
|
|
Include a test for the previously omitted non-trivial code path for
notmuch_thread_get_replies.
|
|
This is for consistency with the recently added tests for
notmuch_database_*.
|