1 Return-Path: <tomi.ollila@iki.fi>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 1CB3B431FC4
\r
6 for <notmuch@notmuchmail.org>; Thu, 31 Oct 2013 00:49:03 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id F5CeEFT+AS+v for <notmuch@notmuchmail.org>;
\r
16 Thu, 31 Oct 2013 00:48:55 -0700 (PDT)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 78EA1431FC2
\r
19 for <notmuch@notmuchmail.org>; Thu, 31 Oct 2013 00:48:55 -0700 (PDT)
\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])
\r
21 by guru.guru-group.fi (Postfix) with ESMTP id 3B4DE1000B2;
\r
22 Thu, 31 Oct 2013 09:48:47 +0200 (EET)
\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
24 To: Ben Gamari <bgamari.foss@gmail.com>, notmuch@notmuchmail.org
\r
25 Subject: Re: [PATCH 1/4] test: Add compact test
\r
26 In-Reply-To: <1383192608-31047-1-git-send-email-bgamari.foss@gmail.com>
\r
27 References: <id:m24n80qqy2.fsf@guru.guru-group.fi>
\r
28 <1383192608-31047-1-git-send-email-bgamari.foss@gmail.com>
\r
29 User-Agent: Notmuch/0.16+119~g219c55f (http://notmuchmail.org) Emacs/24.3.1
\r
30 (x86_64-unknown-linux-gnu)
\r
31 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
32 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
33 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
34 Date: Thu, 31 Oct 2013 09:48:46 +0200
\r
35 Message-ID: <m238nhlw2p.fsf@guru.guru-group.fi>
\r
37 Content-Type: text/plain
\r
38 X-BeenThere: notmuch@notmuchmail.org
\r
39 X-Mailman-Version: 2.1.13
\r
41 List-Id: "Use and development of the notmuch mail system."
\r
42 <notmuch.notmuchmail.org>
\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
46 List-Post: <mailto:notmuch@notmuchmail.org>
\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
50 X-List-Received-Date: Thu, 31 Oct 2013 07:49:03 -0000
\r
52 On Thu, Oct 31 2013, Ben Gamari <bgamari.foss@gmail.com> wrote:
\r
54 > Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
\r
62 > test/compact | 32 ++++++++++++++++++++++++++++++++
\r
63 > test/notmuch-test | 1 +
\r
64 > 2 files changed, 33 insertions(+)
\r
65 > create mode 100755 test/compact
\r
67 > diff --git a/test/compact b/test/compact
\r
68 > new file mode 100755
\r
69 > index 0000000..5bb5cea
\r
71 > +++ b/test/compact
\r
73 > +#!/usr/bin/env bash
\r
74 > +test_description='"notmuch compact"'
\r
77 > +add_message '[subject]=One'
\r
78 > +add_message '[subject]=Two'
\r
79 > +add_message '[subject]=Three'
\r
81 > +notmuch tag +tag1 \*
\r
82 > +notmuch tag +tag2 subject:Two
\r
83 > +notmuch tag -tag1 +tag3 subject:Three
\r
85 > +test_expect_success "Running compact" "notmuch compact"
\r
87 > +test_begin_subtest "Compact preserves database"
\r
88 > +output=$(notmuch search \* | notmuch_search_sanitize)
\r
89 > +test_expect_equal "$output" "\
\r
90 > +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread)
\r
91 > +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag2 unread)
\r
92 > +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Three (inbox tag3 unread)"
\r
94 > +test_begin_subtest "Restoring backup"
\r
95 > +rm -Rf ${TEST_TMPDIR}/mail/xapian
\r
96 > +mv ${TEST_TMPDIR}/mail/xapian.old ${TEST_TMPDIR}/mail/xapian
\r
98 > +output=$(notmuch search \* | notmuch_search_sanitize)
\r
99 > +test_expect_equal "$output" "\
\r
100 > +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread)
\r
101 > +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag2 unread)
\r
102 > +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Three (inbox tag3 unread)"
\r
105 > diff --git a/test/notmuch-test b/test/notmuch-test
\r
106 > index aa28bb0..ec94baf 100755
\r
107 > --- a/test/notmuch-test
\r
108 > +++ b/test/notmuch-test
\r
109 > @@ -19,6 +19,7 @@ cd $(dirname "$0")
\r
120 > _______________________________________________
\r
121 > notmuch mailing list
\r
122 > notmuch@notmuchmail.org
\r
123 > http://notmuchmail.org/mailman/listinfo/notmuch
\r