Re: [feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / 28 / 0ee2c570af31d093253195beaa9d33d2996d07
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 532EB431FB6\r
6         for <notmuch@notmuchmail.org>; Tue, 29 Oct 2013 04:04:05 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\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 KaSEYSjBary3 for <notmuch@notmuchmail.org>;\r
16         Tue, 29 Oct 2013 04:03:59 -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 AA573431FAF\r
19         for <notmuch@notmuchmail.org>; Tue, 29 Oct 2013 04:03:59 -0700 (PDT)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id 163B51000B2;\r
22         Tue, 29 Oct 2013 13:03:50 +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: <1382998997-9938-1-git-send-email-bgamari.foss@gmail.com>\r
27 References: <1382998997-9938-1-git-send-email-bgamari.foss@gmail.com>\r
28 User-Agent: Notmuch/0.16+119~g219c55f (http://notmuchmail.org) Emacs/24.3.1\r
29         (x86_64-unknown-linux-gnu)\r
30 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
31         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
32         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
33 Date: Tue, 29 Oct 2013 13:03:49 +0200\r
34 Message-ID: <m24n80qqy2.fsf@guru.guru-group.fi>\r
35 MIME-Version: 1.0\r
36 Content-Type: text/plain\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Tue, 29 Oct 2013 11:04:05 -0000\r
50 \r
51 On Tue, Oct 29 2013, Ben Gamari <bgamari.foss@gmail.com> wrote:\r
52 \r
53 > Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>\r
54 > ---\r
55 \r
56 Patches 2, 3 & 4 Looks OK To Me. Thanks. A few comments on this patch \r
57 inline:\r
58 \r
59 >  test/compact      | 35 +++++++++++++++++++++++++++++++++++\r
60 >  test/notmuch-test |  1 +\r
61 >  2 files changed, 36 insertions(+)\r
62 >  create mode 100755 test/compact\r
63 >\r
64 > diff --git a/test/compact b/test/compact\r
65 > new file mode 100755\r
66 > index 0000000..54e85ab\r
67 > --- /dev/null\r
68 > +++ b/test/compact\r
69 > @@ -0,0 +1,35 @@\r
70 > +#!/usr/bin/env bash\r
71 > +test_description='"notmuch compact"'\r
72 > +. ./test-lib.sh\r
73 > +\r
74 > +add_message '[subject]=One'\r
75 > +add_message '[subject]=Two'\r
76 > +add_message '[subject]=Three'\r
77 > +\r
78 > +notmuch tag +tag1 \*\r
79 > +notmuch tag +tag2 subject:Two\r
80 > +notmuch tag -tag1 +tag3 subject:Three\r
81 > +\r
82 > +test_begin_subtest "Compacting"\r
83 > +notmuch compact\r
84 > +test_expect_success "compact" "notmuch compact"\r
85 \r
86 test_expect_success executes "$2" ("notmuch compact" in this case)\r
87 do you mean to run notmuch 'compact twice' ?\r
88 \r
89 > +notmuch search \*\r
90 > +output=$(notmuch search \* | notmuch_search_sanitize)\r
91 \r
92 Now do you mean to run 'notmuch search \*' twice ?\r
93 \r
94 > +test_expect_equal "$output" "\\r
95 > +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread)\r
96 > +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag2 unread)\r
97 > +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Three (inbox tag3 unread)"\r
98 > +\r
99 > +test_begin_subtest "Restoring backup"\r
100 > +rm -Rf ${TEST_TMPDIR}/mail/xapian\r
101 > +mv ${TEST_TMPDIR}/mail/xapian.old ${TEST_TMPDIR}/mail/xapian\r
102 > +\r
103 > +notmuch search \*\r
104 > +output=$(notmuch search \* | notmuch_search_sanitize)\r
105 \r
106 again... ?\r
107 \r
108 \r
109 ... actually David Bremner had even more insightful comments in \r
110 id:874n8cw2yq.fsf@zancas.localnet to these same issues :D\r
111 \r
112 \r
113 Tomi\r
114 \r
115 \r
116 > +test_expect_equal "$output" "\\r
117 > +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread)\r
118 > +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag2 unread)\r
119 > +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Three (inbox tag3 unread)"\r
120 > +\r
121 > +test_done\r
122 > diff --git a/test/notmuch-test b/test/notmuch-test\r
123 > index aa28bb0..ec94baf 100755\r
124 > --- a/test/notmuch-test\r
125 > +++ b/test/notmuch-test\r
126 > @@ -19,6 +19,7 @@ cd $(dirname "$0")\r
127 >  TESTS="\r
128 >    basic\r
129 >    help-test\r
130 > +  compact\r
131 >    config\r
132 >    setup\r
133 >    new\r
134 > -- \r
135 > 1.8.3.2\r
136 >\r
137 > _______________________________________________\r
138 > notmuch mailing list\r
139 > notmuch@notmuchmail.org\r
140 > http://notmuchmail.org/mailman/listinfo/notmuch\r