unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Ben Gamari <bgamari.foss@gmail.com>, notmuch@notmuchmail.org
Subject: Re: [PATCH 1/3] test: Add compact test
Date: Sun, 20 Oct 2013 09:18:05 -0300	[thread overview]
Message-ID: <874n8cw2yq.fsf@zancas.localnet> (raw)
In-Reply-To: <1381799585-16274-2-git-send-email-bgamari.foss@gmail.com>


Hi Ben;

Thanks for writing these tests. I have some proposed changes. I didn't
understand why you called notmuch search twice, and for whatever reason
test_begin_subtest doesn't pair up with test_expect_success

diff --git a/test/compact b/test/compact
index 54e85ab..5bb5cea 100755
--- a/test/compact
+++ b/test/compact
@@ -10,11 +10,9 @@ notmuch tag +tag1 \*
 notmuch tag +tag2 subject:Two
 notmuch tag -tag1 +tag3 subject:Three
 
-test_begin_subtest "Compacting"
-notmuch compact
-test_expect_success "compact" "notmuch compact"
+test_expect_success "Running compact" "notmuch compact"
 
-notmuch search \*
+test_begin_subtest "Compact preserves database"
 output=$(notmuch search \* | notmuch_search_sanitize)
 test_expect_equal "$output" "\
 thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread)
@@ -25,7 +23,6 @@ test_begin_subtest "Restoring backup"
 rm -Rf ${TEST_TMPDIR}/mail/xapian
 mv ${TEST_TMPDIR}/mail/xapian.old ${TEST_TMPDIR}/mail/xapian
 
-notmuch search \*
 output=$(notmuch search \* | notmuch_search_sanitize)
 test_expect_equal "$output" "\
 thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread)

  reply	other threads:[~2013-10-20 12:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15  1:13 [PATCH] Compact tests and error handling Ben Gamari
2013-10-15  1:13 ` [PATCH 1/3] test: Add compact test Ben Gamari
2013-10-20 12:18   ` David Bremner [this message]
2013-10-15  1:13 ` [PATCH 2/3] compact: Give user more feedback on failure renaming Ben Gamari
2013-10-15  1:13 ` [PATCH 3/3] compact: Provide user with more error feedback Ben Gamari
2013-10-20 18:13   ` Tomi Ollila
2013-10-26 12:26 ` [PATCH] Compact tests and error handling David Bremner
2013-10-27 20:29   ` Ben Gamari
  -- strict thread matches above, loose matches on Subject: below --
2013-10-27 20:30 [PATCH 1/3] test: Add compact test Ben Gamari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874n8cw2yq.fsf@zancas.localnet \
    --to=david@tethera.net \
    --cc=bgamari.foss@gmail.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).