mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-01-08 17:51:42 +01:00
test: regression test for n_d_get_revision
This function only accesses data cached by notmuch, so being closed is not a problem.
This commit is contained in:
parent
bcb02dd8fc
commit
959cb4b7a7
1 changed files with 18 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue