Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 71459431FC4 for ; Wed, 30 Oct 2013 21:10:10 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id trQe4N74x9W4 for ; Wed, 30 Oct 2013 21:10:06 -0700 (PDT) Received: from mail-qa0-f46.google.com (mail-qa0-f46.google.com [209.85.216.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 05B8D431FC2 for ; Wed, 30 Oct 2013 21:10:05 -0700 (PDT) Received: by mail-qa0-f46.google.com with SMTP id j15so4243250qaq.5 for ; Wed, 30 Oct 2013 21:10:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type; bh=aoUHqBCu/QG50sSwZaf+RK0XZTE6wL3kmoOcgJ1gcQ0=; b=oBo76EQX+IZDhkb+cEcYJTNxXNnTVyzRW5w2MUgw5aMgHx43lIS/aSfQp+FWB2MHtU QqC+cg0FdhJ5lQ++PTowwD1M/bs4Zz6Rpqp1RhhfcOPrTOmrKQz1nblyHDTfj2bafCxA h6J/YCoBlvwaP01grLz0XaJc5h8xM7E5hVLLRgRnfYAMncpYfhX+Zi3hZAhEadBKwdSQ VGZgcHVZLVWIQcA7ouUvcEjXVh2vnxIgp+OZlt+1G/FterTI7jL4zLqGYnHsc7TppJvh A5+fg+fUKksaKdxbZeG8btmgH7mywolr6ryRPUIWHsQluRqBKuinaLc2/u/efJ339IXR ClZw== X-Received: by 10.224.32.66 with SMTP id b2mr2414766qad.80.1383192603354; Wed, 30 Oct 2013 21:10:03 -0700 (PDT) Received: from localhost (pool-96-240-254-51.spfdma.east.verizon.net. [96.240.254.51]) by mx.google.com with ESMTPSA id r1sm5126596qam.4.2013.10.30.21.10.01 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 30 Oct 2013 21:10:02 -0700 (PDT) From: Ben Gamari To: Tomi Ollila , notmuch@notmuchmail.org Subject: Re: [PATCH 1/4] test: Add compact test In-Reply-To: References: <1382998997-9938-1-git-send-email-bgamari.foss@gmail.com> User-Agent: Notmuch/0.16+107~g1ef2773 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Thu, 31 Oct 2013 00:10:00 -0400 Message-ID: <87r4b2hyhz.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Oct 2013 04:10:10 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Tomi Ollila writes: > On Tue, Oct 29 2013, Ben Gamari wrote: > >> Signed-off-by: Ben Gamari >> --- > > Patches 2, 3 & 4 Looks OK To Me. Thanks. A few comments on this patch=20 > inline: > Thanks again for the review! >> test/compact | 35 +++++++++++++++++++++++++++++++++++ >> test/notmuch-test | 1 + >> 2 files changed, 36 insertions(+) >> create mode 100755 test/compact >> >> diff --git a/test/compact b/test/compact >> new file mode 100755 >> index 0000000..54e85ab >> --- /dev/null >> +++ b/test/compact >> @@ -0,0 +1,35 @@ >> +#!/usr/bin/env bash >> +test_description=3D'"notmuch compact"' >> +. ./test-lib.sh >> + >> +add_message '[subject]=3DOne' >> +add_message '[subject]=3DTwo' >> +add_message '[subject]=3DThree' >> + >> +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 executes "$2" ("notmuch compact" in this case) > do you mean to run notmuch 'compact twice' ? > It's been a while but I suspect I just never cleaned up the patch after coming to this realization. Anyways, it's fixed in the revised patch coming shortly. >> +notmuch search \* >> +output=3D$(notmuch search \* | notmuch_search_sanitize) > > Now do you mean to run 'notmuch search \*' twice ? > >> +test_expect_equal "$output" "\ >> +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unrea= d) >> +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 unr= ead)" >> + >> +test_begin_subtest "Restoring backup" >> +rm -Rf ${TEST_TMPDIR}/mail/xapian >> +mv ${TEST_TMPDIR}/mail/xapian.old ${TEST_TMPDIR}/mail/xapian >> + >> +notmuch search \* >> +output=3D$(notmuch search \* | notmuch_search_sanitize) > > again... ? > > > ... actually David Bremner had even more insightful comments in=20 > id:874n8cw2yq.fsf@zancas.localnet to these same issues :D > Hmm, it seems I overlooked these. Thanks for the reference. Cheers, =2D Ben --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQEcBAEBAgAGBQJScdgYAAoJEErkyLZmeNiDPSoH+wRC+gErdvsUW8Cwp2WmhfCf sHgZv6xrmvDHiVmkzfyf0vlf9XVyVIV3swTb1pzI0vb1DtGzdagOX7LR6nAb0+bK D6ulf+EKCsk5vy4wdaTcQcYEFY6WWXzH3/sWR1MUkN0h+5+R9xm1r1CBsoviioHt CFhkF/GdRsTHi0yczh7ifCXqNWGJav1PtrRLzBTlA8XtT96f0JtBpO+LJxtIwJYB knMAMdeObXd7oeqJ+LApglSOOMzKtkboKV8u2G8FKtEgVSCcue/KV+jJ/3wIFmxL ryDdwuKsGvfFogtZt7n/Xp7dUFI5TIn1sRs3iABH09IJxFClG4YWU/sY5W5bVus= =MsP5 -----END PGP SIGNATURE----- --=-=-=--