]> git.notmuchmail.org Git - notmuch/blobdiff - test/T050-new.sh
test: Add two tests for error output from notmuch_database_open
[notmuch] / test / T050-new.sh
index 7119356fc9fe1dc20d6a8d5f4be20f5117bb816a..e6c3291f786553c972e457cf5aeb749c1edca5e5 100755 (executable)
@@ -276,4 +276,11 @@ test_expect_code 1 "Invalid tags set exit code" \
 
 notmuch config set new.tags $OLDCONFIG
 
+
+test_begin_subtest "Xapian exception: read only files"
+chmod u-w  ${MAIL_DIR}/.notmuch/xapian/*.DB
+output=$(NOTMUCH_NEW 2>&1 | sed 's/: .*$//' )
+chmod u+w  ${MAIL_DIR}/.notmuch/xapian/*.DB
+test_expect_equal "$output" "A Xapian exception occurred opening database"
+
 test_done