]> git.notmuchmail.org Git - notmuch/blobdiff - test/T150-tagging.sh
test: Add two tests for error output from notmuch_database_open
[notmuch] / test / T150-tagging.sh
index 45471ac8de72962937761873c81b1f6bcb229609..4a2673d442b17379f8d18f4950f325a5247c7ea9 100755 (executable)
@@ -261,4 +261,10 @@ test_expect_code 1 "Empty tag names" 'notmuch tag + One'
 
 test_expect_code 1 "Tag name beginning with -" 'notmuch tag +- One'
 
+test_begin_subtest "Xapian exception: read only files"
+chmod u-w  ${MAIL_DIR}/.notmuch/xapian/*.DB
+output=$(notmuch tag +something '*' 2>&1 | sed 's/: .*$//' )
+chmod u+w  ${MAIL_DIR}/.notmuch/xapian/*.DB
+test_expect_equal "$output" "A Xapian exception occurred opening database"
+
 test_done