mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-25 19:04:53 +01:00
test: regression for retrieving closed db from message
This is actually one of the few potentially useful things you can do with a message belonging to a closed database, since in principle you could re-open the database.
This commit is contained in:
parent
1578e2af6a
commit
a2279c322e
1 changed files with 16 additions and 0 deletions
|
@ -645,4 +645,20 @@ cat <<EOF > EXPECTED
|
|||
EOF
|
||||
test_expect_equal_file EXPECTED OUTPUT
|
||||
|
||||
test_begin_subtest "Handle retrieving closed db from message"
|
||||
cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR}
|
||||
{
|
||||
notmuch_database_t *db2;
|
||||
db2 = notmuch_message_get_database (message);
|
||||
printf("%d\n%d\n", message != NULL, db == db2);
|
||||
}
|
||||
EOF
|
||||
cat <<EOF > EXPECTED
|
||||
== stdout ==
|
||||
1
|
||||
1
|
||||
== stderr ==
|
||||
EOF
|
||||
test_expect_equal_file EXPECTED OUTPUT
|
||||
|
||||
test_done
|
||||
|
|
Loading…
Reference in a new issue