diff options
| author | David Bremner <david@tethera.net> | 2020-07-08 21:17:06 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2020-07-20 08:54:42 -0300 |
| commit | 1578e2af6a412a72346d5264d2d6707972a95b33 (patch) | |
| tree | b2e58a93c62bef10ccffe583caad5b7745991a0a | |
| parent | 9244f588608ccedeab5e82e965a86c04a22be4b7 (diff) | |
test: regression test for destroying message with closed db
This should be fine because the message belongs to the
database (talloc context wise).
| -rwxr-xr-x | test/T560-lib-error.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh index 1ee9bd06..492c1fb5 100755 --- a/test/T560-lib-error.sh +++ b/test/T560-lib-error.sh @@ -630,4 +630,19 @@ cat <<EOF > EXPECTED EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "Handle destroying message with closed db" +cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR} + { + notmuch_message_destroy (message); + printf("%d\n%d\n", message != NULL, 1); + } +EOF +cat <<EOF > EXPECTED +== stdout == +1 +1 +== stderr == +EOF +test_expect_equal_file EXPECTED OUTPUT + test_done |
