diff options
| author | David Bremner <david@tethera.net> | 2020-07-15 22:59:58 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2020-07-22 19:52:55 -0300 |
| commit | 964e783fd42ae870d2aa24a4e4ff14bc5c7a1945 (patch) | |
| tree | c4f8790894510766ef1aa57ec108b1d708dca74b | |
| parent | ab456541924dcb1e1c6d6c7ba1781011e3453f27 (diff) | |
test: regression test for closing a closed database
This does not currently throw an error, and it should stay that way.
| -rwxr-xr-x | test/T562-lib-database.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/T562-lib-database.sh b/test/T562-lib-database.sh index 20bed8b4..fe5555ec 100755 --- a/test/T562-lib-database.sh +++ b/test/T562-lib-database.sh @@ -85,4 +85,19 @@ A Xapian exception occurred at lib/database.cc:XXX: Database has been closed EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "re-close a closed db" +cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} + { + EXPECT0(notmuch_database_close (db)); + stat = notmuch_database_close (db); + printf ("%d\n", stat); + } +EOF +cat <<EOF > EXPECTED +== stdout == +0 +== stderr == +EOF +test_expect_equal_file EXPECTED OUTPUT + test_done |
