The plan is to re-use them in testing the same errors from the CLI
. ./test-lib.sh || exit 1
-backup_database () {
- rm -rf notmuch-dir-backup
- cp -pR ${MAIL_DIR}/.notmuch notmuch-dir-backup
-}
-restore_database () {
- rm -rf ${MAIL_DIR}/.notmuch
- cp -pR notmuch-dir-backup ${MAIL_DIR}/.notmuch
-}
-
-
add_email_corpus
test_expect_success "building database" "NOTMUCH_NEW"
done
}
+backup_database () {
+ test_name=$(basename $0 .sh)
+ rm -rf notmuch-dir-backup."$test_name"
+ cp -pR ${MAIL_DIR}/.notmuch notmuch-dir-backup."${test_name}"
+}
+
+restore_database () {
+ test_name=$(basename $0 .sh)
+ rm -rf ${MAIL_DIR}/.notmuch
+ cp -pR notmuch-dir-backup."${test_name}" ${MAIL_DIR}/.notmuch
+}
+
# Test the binaries we have just built. The tests are kept in
# test/ subdirectory and are run in 'trash directory' subdirectory.
TEST_DIRECTORY=$(pwd)