mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-01-24 12:14:24 +01:00
test: regression test for closing a closed database
This does not currently throw an error, and it should stay that way.
This commit is contained in:
parent
ab45654192
commit
964e783fd4
1 changed files with 15 additions and 0 deletions
|
@ -85,4 +85,19 @@ A Xapian exception occurred at lib/database.cc:XXX: Database has been closed
|
||||||
EOF
|
EOF
|
||||||
test_expect_equal_file EXPECTED OUTPUT
|
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
|
test_done
|
||||||
|
|
Loading…
Add table
Reference in a new issue