mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
test: add regression test for n_m_get_header
This function already catches Xapian exceptions, and we want to make sure it stays that way.
This commit is contained in:
parent
9201c50204
commit
056794a60d
1 changed files with 16 additions and 0 deletions
|
@ -371,4 +371,20 @@ cat <<EOF > EXPECTED
|
|||
EOF
|
||||
test_expect_equal_file EXPECTED OUTPUT
|
||||
|
||||
test_begin_subtest "Handle getting header from closed database"
|
||||
cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR}
|
||||
{
|
||||
const char *from;
|
||||
from=notmuch_message_get_header (message, "from");
|
||||
printf("%s\n%d\n", id, from == NULL);
|
||||
}
|
||||
EOF
|
||||
cat <<EOF > EXPECTED
|
||||
== stdout ==
|
||||
1258471718-6781-1-git-send-email-dottedmag@dottedmag.net
|
||||
1
|
||||
== stderr ==
|
||||
EOF
|
||||
test_expect_equal_file EXPECTED OUTPUT
|
||||
|
||||
test_done
|
||||
|
|
Loading…
Reference in a new issue