aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Jani Nikula <jani@nikula.org>2013-11-03 14:24:49 +0200
committerGravatar David Bremner <david@tethera.net>2013-11-07 06:58:58 -0400
commit54e7f1777d0b623e0995c9d5e88ab9b412e470bb (patch)
tree92c96d5ae2a32ccdcd74f54701e13d88bd998015 /test
parentd34be29a41bbe1d5bd2c81d7d791cd67ac4eb649 (diff)
cli: add compact --backup=DIRECTORY option, don't backup by default
It's the user's decision. The recommended way is to do a database dump anyway. Clean up the relevant printfs too.
Diffstat (limited to 'test')
-rwxr-xr-xtest/compact4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/compact b/test/compact
index afab5372..ac174cec 100755
--- a/test/compact
+++ b/test/compact
@@ -10,7 +10,7 @@ notmuch tag +tag1 \*
notmuch tag +tag2 subject:Two
notmuch tag -tag1 +tag3 subject:Three
-test_expect_success "Running compact" "notmuch compact"
+test_expect_success "Running compact" "notmuch compact --backup=${TEST_DIRECTORY}/xapian.old"
test_begin_subtest "Compact preserves database"
output=$(notmuch search \* | notmuch_search_sanitize)
@@ -21,7 +21,7 @@ thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Three (inbox tag3 unread)"
test_expect_success 'Restoring Backup' \
'rm -Rf ${MAIL_DIR}/.notmuch/xapian &&
- mv ${MAIL_DIR}/xapian.old ${MAIL_DIR}/.notmuch/xapian'
+ mv ${TEST_DIRECTORY}/xapian.old ${MAIL_DIR}/.notmuch/xapian'
test_begin_subtest "Checking restored backup"
output=$(notmuch search \* | notmuch_search_sanitize)