mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-23 01:44:52 +01:00
test: Add two tests for error output from notmuch_database_open
This is arguably testing the same thing twice, but in the brave new future where we don't use printf anymore, each subcommand will be responsible for handling the output on it's own.
This commit is contained in:
parent
bed8b6743d
commit
baf93369f6
2 changed files with 13 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue