| Age | Commit message (Collapse) | Author |
|
One test is deleted since that method is not provided by the new
bindings. Similar things can be done by accessing the PropertiesMap
returned by properties.
This change is a prelude to removing the legacy bindings from the build.
|
|
It wasn't covered, though it shares most of its implementation with
notmuch_message_remove_all_properties.
|
|
_notmuch_message_remove_all_properties wasn't syncing the message back
to the database but was still invalidating the metadata, giving the
impression the properties had actually been removed.
Also move the metadata invalidation to _notmuch_message_remove_terms
to be closer to what's done in _notmuch_message_modify_property and
_notmuch_message_remove_term.
|
|
Close and re-open the database to show that the removal is not
committed to the database.
|
|
notmuch_message_remove_all_properties should have removed the
testkey1 = testvalue1
property but hasn't. Delay the execution of the corresponding test
to avoid updating a few tests that actually relied on the broken
behavior.
|
|
The other tests rely on a stable output.
|
|
To make the tests a bit easier to understand.
|
|
Since libnotmuch exposes a C interface there's no way for clients to
catch this.
Inspired by what's done for tags (see notmuch_message_remove_tag).
|
|
These two functions don't fail gracefully when editing a removed
message:
BROKEN edit property on removed message without uncaught exception
--- T610-message-property.20.EXPECTED 2023-02-27 11:33:25.792764376 +0000
+++ T610-message-property.20.OUTPUT 2023-02-27 11:33:25.793764381 +0000
@@ -1,2 +1,3 @@
== stdout ==
== stderr ==
+terminate called after throwing an instance of 'Xapian::DocNotFoundError'
The other functions appear to be safe.
|
|
This is a bit more involved than replacing the use of
notmuch_database_open_verbose, as we have to effectively inline the
definition of notmuch_database_open.
|
|
This removes some redudant includes, and will also make it easier to
introduce "#define _GNU_SOURCE", which must come before all system
includes.
|
|
|
|
This test extracts values from a (key,value) map where multiple entries
can have the same key, and the entries are sorted by key, but not by
value. The test incorrectly assumes that the values will be sorted as
well, so sort the output.
|
|
I can't figure out how checking the sign of a bool ever worked. The
following program demonstrates the problem (i.e. for me it prints 1).
#include <stdio.h>
#include <stdbool.h>
int main(int argc, char **argv) {
bool x;
x = -1;
printf("x = %d\n", x);
}
This seems to be mandated by the C99 standard 6.3.1.2.
|
|
Because the string_map functions are not exported, we test via message
properties.
|
|
These roughly replicate the equivalent C tests, although they rely on
the database state created by the former tests, since the python
bindings currently provide read-only access to properties.
|
|
Don't assume the tests are always run from within the source tree.
|
|
Add in the analogous test for tags that is given for properties a few
lines below.
|
|
Reported in [1], --include=properties currently implies
--include=tags, but it should not.
[1] id:87y3u8vjbo.fsf@tethera.net
|
|
We want to be able to query the properties directly, like:
notmuch count property:foo=bar
which should return a count of messages where the property with key
"foo" has value equal to "bar".
|
|
This somewhat mimics the config line parsing, except there can be
arbitrarily many key value pairs, so one more level of looping is
required.
|
|
Part of providing extensibility via properties is to make sure that user
data is not lost. Thus we need to be able to dump and restore
properties.
|
|
This is a thin wrapper around the string map iterator API just introduced.
|
|
Initially, support get, set and removal of single key/value pair, as
well as removing all properties.
|