diff options
| author | David Bremner <david@tethera.net> | 2020-07-04 08:35:08 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2020-07-13 07:19:22 -0300 |
| commit | 056794a60d4f7c1f1d88d239e21f761f91cf03ce (patch) | |
| tree | ff8782a805f345b85a79f56958cf84b20cc41a30 /test/T560-lib-error.sh | |
| parent | 9201c502047816f2a22346fb02c971c50e5a7fcf (diff) | |
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.
Diffstat (limited to 'test/T560-lib-error.sh')
| -rwxr-xr-x | test/T560-lib-error.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh index 6432faaa..777eb375 100755 --- a/test/T560-lib-error.sh +++ b/test/T560-lib-error.sh @@ -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 |
