]> git.cworth.org Git - notmuch/blobdiff - test/compact
cli: add compact --backup=DIRECTORY option, don't backup by default
[notmuch] / test / compact
index afab5372dc7153c808610145b15597f569e42d0b..ac174cec7111e91e80f2274a83d56f32ff8620b7 100755 (executable)
@@ -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)