diff options
| author | David Bremner <david@tethera.net> | 2020-07-16 20:04:12 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2020-07-22 19:52:55 -0300 |
| commit | 959cb4b7a7d2a723a297468c7a0a2c12e9ec95bd (patch) | |
| tree | 3bcf5822c2efc4f0fb0192021831590db843ebce /test | |
| parent | bcb02dd8fc176729525869a969c0bc8de2acfaa9 (diff) | |
test: regression test for n_d_get_revision
This function only accesses data cached by notmuch, so being closed is
not a problem.
Diffstat (limited to 'test')
| -rwxr-xr-x | test/T562-lib-database.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/T562-lib-database.sh b/test/T562-lib-database.sh index 857bdd12..620a9ca3 100755 --- a/test/T562-lib-database.sh +++ b/test/T562-lib-database.sh @@ -202,4 +202,22 @@ cat <<EOF > EXPECTED EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "get revision for a closed db" +cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} + { + const char *uuid; + unsigned long rev; + + EXPECT0(notmuch_database_close (db)); + rev = notmuch_database_get_revision (db, &uuid); + printf ("%d\n", rev, uuid); + } +EOF +cat <<EOF > EXPECTED +== stdout == +53 +== stderr == +EOF +test_expect_equal_file EXPECTED OUTPUT + test_done |
