test: test explicit configuration of backup directory

Including the relative path that was broken until a recent commit.
This commit is contained in:
David Bremner 2021-05-07 07:56:08 -03:00
parent 891b950219
commit 8bf3311084

View file

@ -54,4 +54,23 @@ for key in 'from/subject/message-ID in database' \
restore_database restore_database
done done
test_begin_subtest "upgrade with configured backup dir"
notmuch config set database.backup_dir ${HOME}/backups
delete_feature 'modification tracking'
notmuch new | grep Backing | notmuch_dir_sanitize | sed 's/dump-[0-9T]*/dump-XXX/' > OUTPUT
cat <<EOF > EXPECTED
Backing up tags to CWD/home/backups/dump-XXX.gz...
EOF
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "upgrade with relative configured backup dir"
notmuch config set database.backup_dir ${HOME}/backups
delete_feature 'modification tracking'
notmuch new | grep Backing | notmuch_dir_sanitize | sed 's/dump-[0-9T]*/dump-XXX/' > OUTPUT
cat <<EOF > EXPECTED
Backing up tags to CWD/home/backups/dump-XXX.gz...
EOF
test_expect_equal_file EXPECTED OUTPUT
test_done test_done