David Bremner
f6e7a9dde5
test: replace deprecated use of notmuch_database_open_verbose
...
We need to do it some day, and it is a bit annoying to read
deprecation messages in broken tests.
2022-05-29 07:36:32 -03:00
David Bremner
1643c0459a
test: move system includes to notmuch-test.h
...
This removes some redudant includes, and will also make it easier to
introduce "#define _GNU_SOURCE", which must come before all system
includes.
2021-12-04 12:36:08 -04:00
David Bremner
a37d5f5976
test: Fix race condition in T568-lib-thread.sh
...
The assignment of thread-ids is (apparently) non-deterministic in a
way that mostly seems to show up on multicore machines. In my tests
the number is different from that previously assumed by this test
about 15% of the time on a 50 thread (25 core) Xeon.
Since message id's are fixed, use a message known to be in the thread
of interest to pick out the correct thread-id.
2021-02-18 07:15:47 -04:00
David Bremner
e5e17926db
test: add regression test for n_messages_collect_tags
...
Also test n_messages_destroy.
2020-08-03 20:47:18 -03:00
David Bremner
00f48f397a
test: destroy thread from closed database
...
Check for (non)-crash.
2020-07-31 07:41:00 -03:00
David Bremner
864f422f14
test: regression test for n_thread_get_tags
...
Code is taken from the API docs, with the twist that the underlying
database is closed. Not crashing is the main point.
2020-07-31 07:41:00 -03:00
David Bremner
43406e7d4c
test: add regression tests for oldest and newest dates
...
These are strictly to watch for crashes, so don't be too fussy about
the actual timestamps.
2020-07-31 07:41:00 -03:00
David Bremner
c5017c76d9
test: add regression tests for n_t_get_{authors, subject}
...
This is returning explicitely cached data, so no database access is needed.
2020-07-31 07:41:00 -03:00
David Bremner
70b30066f6
test: add regression test for n_t_get_messages
...
This is similar to the case of toplevel messages. Currently everything
is cached, so no database access is necessary. This might change in
the future, but it should not crash in either case.
2020-07-31 07:41:00 -03:00
David Bremner
6ccc4338a4
test: add regression tests for n_thread_get_toplevel_messages
...
Include a test for the previously omitted non-trivial code path for
notmuch_thread_get_replies.
2020-07-31 07:41:00 -03:00
David Bremner
02ab473115
test: add regression test for n_thread_get_total_{messages,files}
...
This is returning cached info, so does not need to access the (closed)
database.
2020-07-31 07:41:00 -03:00
David Bremner
0baa581e6e
test: regression test for n_t_get_thread_id
...
This is just cached data, so as long as we don't prematurely free
anything, it should be fine.
2020-07-31 07:41:00 -03:00