aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar David Bremner <david@tethera.net>2013-11-03 14:24:41 +0200
committerGravatar David Bremner <david@tethera.net>2013-11-06 17:49:23 -0400
commit425e73e1461b8f7379bf0d5290b3ffaadf2392f9 (patch)
tree1475c126fd47bed32ddffa7ed80b071e9e2ec5c8 /test
parentfd733a4f5c41948b895e37daf9bc0912f695ae59 (diff)
test: fix compact backup / restore test
It was looking in completely the wrong place for the backup and the (test) xapian database. Unfortunately test_begin_subtest hides the relevant errors.
Diffstat (limited to 'test')
-rwxr-xr-xtest/compact7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/compact b/test/compact
index 5bb5cea4..afab5372 100755
--- a/test/compact
+++ b/test/compact
@@ -19,10 +19,11 @@ thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread)
thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag2 unread)
thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Three (inbox tag3 unread)"
-test_begin_subtest "Restoring backup"
-rm -Rf ${TEST_TMPDIR}/mail/xapian
-mv ${TEST_TMPDIR}/mail/xapian.old ${TEST_TMPDIR}/mail/xapian
+test_expect_success 'Restoring Backup' \
+ 'rm -Rf ${MAIL_DIR}/.notmuch/xapian &&
+ mv ${MAIL_DIR}/xapian.old ${MAIL_DIR}/.notmuch/xapian'
+test_begin_subtest "Checking restored backup"
output=$(notmuch search \* | notmuch_search_sanitize)
test_expect_equal "$output" "\
thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread)