[PATCH 06/10] cli: Introduce "notmuch address" command
[notmuch-archives.git] / 27 / 1d91d5883454b607b1606bfcfda665831479c2
1 Return-Path: <jani@nikula.org>\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 CC506431FB6\r
6         for <notmuch@notmuchmail.org>; Fri,  9 Mar 2012 00:24:25 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 PD36ThVEUoly for <notmuch@notmuchmail.org>;\r
16         Fri,  9 Mar 2012 00:24:25 -0800 (PST)\r
17 Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
18         [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id E7B82431FAE\r
21         for <notmuch@notmuchmail.org>; Fri,  9 Mar 2012 00:24:24 -0800 (PST)\r
22 Received: by lahc1 with SMTP id c1so1461737lah.26\r
23         for <notmuch@notmuchmail.org>; Fri, 09 Mar 2012 00:24:21 -0800 (PST)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=google.com; s=20120113;\r
26         h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
27         :mime-version:content-type:x-gm-message-state;\r
28         bh=Vx5txwyr+NxGJca3COSR/enwrJm5Rwns75lCWeN9PTE=;\r
29         b=f25j03GQBVJoHgHpt4tUQwR5yBUpiQw2PtG1FHvuGTdTaxTxkqucmNyl8eaSVp1sya\r
30         KMhzlFjtAa9j1Moyd8CcM1XEXszeNPJNyTlZTFvbCJrl0vp53PflMpe4c+t5ZjtR68aD\r
31         NtIpwNH7ZPUpBE6KDlj4n3hDPAaHrvwCOxBYJAcwECXjM+eKwDegx9cZqaNCvYyb8gsW\r
32         yEaonsyqpP/z8hWGytoz8UmM/5JJ+K0jnGjrL5XjQjnH2pmzkiXvxPiGJ06R3JB9X+ml\r
33         LJrbUqAnJBydxSyB8dhdeoOfVehZaNe8e36Itm6yGNjlAhHR13E1E4JgrcDIiFr9VB4k\r
34         Eq8A==\r
35 Received: by 10.112.87.225 with SMTP id bb1mr451713lbb.59.1331281461803;\r
36         Fri, 09 Mar 2012 00:24:21 -0800 (PST)\r
37 Received: from localhost (dsl-hkibrasgw4-fe50f800-253.dhcp.inet.fi.\r
38         [84.248.80.253])\r
39         by mx.google.com with ESMTPS id hv2sm5591916lbb.9.2012.03.09.00.24.19\r
40         (version=SSLv3 cipher=OTHER); Fri, 09 Mar 2012 00:24:20 -0800 (PST)\r
41 From: Jani Nikula <jani@nikula.org>\r
42 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>, notmuch@notmuchmail.org\r
43 Subject: Re: [PATCH 2/2] test: use subtest name for generated message subject\r
44         by default\r
45 In-Reply-To: <1327961195-4204-2-git-send-email-dmitry.kurochkin@gmail.com>\r
46 References: <1327961195-4204-1-git-send-email-dmitry.kurochkin@gmail.com>\r
47         <1327961195-4204-2-git-send-email-dmitry.kurochkin@gmail.com>\r
48 User-Agent: Notmuch/0.11.1+295~g780f284 (http://notmuchmail.org) Emacs/23.3.1\r
49         (i686-pc-linux-gnu)\r
50 Date: Fri, 09 Mar 2012 10:24:17 +0200\r
51 Message-ID: <87ipie89n2.fsf@nikula.org>\r
52 MIME-Version: 1.0\r
53 Content-Type: text/plain; charset=us-ascii\r
54 X-Gm-Message-State:\r
55  ALoCoQkeHRZAKO6jbPqu/2YiOwXzehR11mRE9Hv0woG2LJJeTlW0uTtnPtYuvoTivsZG2Qb+LPpU\r
56 X-BeenThere: notmuch@notmuchmail.org\r
57 X-Mailman-Version: 2.1.13\r
58 Precedence: list\r
59 List-Id: "Use and development of the notmuch mail system."\r
60         <notmuch.notmuchmail.org>\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
64 List-Post: <mailto:notmuch@notmuchmail.org>\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
67         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
68 X-List-Received-Date: Fri, 09 Mar 2012 08:24:25 -0000\r
69 \r
70 \r
71 Hi Dmitry, I tagged this notmuch::stale as it no longer cleanly applies\r
72 to master.\r
73 \r
74 BR,\r
75 Jani.\r
76 \r
77 On Tue, 31 Jan 2012 02:06:35 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:\r
78 > Before the change, messages generated by generate_message() used "Test\r
79 > message #N" for default subject where N is the generated messages\r
80 > counter.  Since message subject is commonly present in expected\r
81 > results, there is a chance of breaking other tests when a new\r
82 > generate_message() call is added.  The patch changes default subject\r
83 > value for generated messages to subtest name if it is available.  If\r
84 > subtest name is not available (i.e. message is generated during test\r
85 > initialization), the old default value is used (in this case it is\r
86 > fine to have the counter in the subject).\r
87\r
88 > Another benefit of this change is a sane default value for subject in\r
89 > generated messages, which would allow to simplify code like:\r
90\r
91 >   test_begin_subtest "test for a cool feature"\r
92 >   add_message [subject]="message for test for a cool feature"\r
93 > ---\r
94 >  test/encoding                |    2 +-\r
95 >  test/search-folder-coherence |    2 +-\r
96 >  test/test-lib.sh             |    6 +++++-\r
97 >  3 files changed, 7 insertions(+), 3 deletions(-)\r
98\r
99 > diff --git a/test/encoding b/test/encoding\r
100 > index 33259c1..dbaceb0 100755\r
101 > --- a/test/encoding\r
102 > +++ b/test/encoding\r
103 > @@ -9,7 +9,7 @@ output=$(notmuch show id:${gen_msg_id} 2>&1 | notmuch_show_sanitize)\r
104 >  test_expect_equal "$output" "\f\r
105 message{ id:msg-001@notmuch-test-suite depth:0 match:1 filename:/XXX/mail/msg-001\r
106 >  \f\r
107 header{\r
108 >  Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox unread)\r
109 > -Subject: Test message #1\r
110 > +Subject: Message with text of unknown charset\r
111 >  From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
112 >  To: Notmuch Test Suite <test_suite@notmuchmail.org>\r
113 >  Date: Fri, 05 Jan 2001 15:43:57 +0000\r
114 > diff --git a/test/search-folder-coherence b/test/search-folder-coherence\r
115 > index f8119cb..3f6ec76 100755\r
116 > --- a/test/search-folder-coherence\r
117 > +++ b/test/search-folder-coherence\r
118 > @@ -32,7 +32,7 @@ test_expect_equal_file OUTPUT EXPECTED\r
119 >  \r
120 >  test_begin_subtest "Test matches folder:spam"\r
121 >  output=$(notmuch search folder:spam)\r
122 > -test_expect_equal "$output" "thread:0000000000000001   2001-01-05 [1/1] Notmuch Test Suite; Test message #1 (inbox unread)"\r
123 > +test_expect_equal "$output" "thread:0000000000000001   2001-01-05 [1/1] Notmuch Test Suite; Single new message (inbox unread)"\r
124 >  \r
125 >  test_begin_subtest "Remove folder:spam copy of email"\r
126 >  rm $dir/spam/$(basename $file_x)\r
127 > diff --git a/test/test-lib.sh b/test/test-lib.sh\r
128 > index 8158328..94efdc1 100644\r
129 > --- a/test/test-lib.sh\r
130 > +++ b/test/test-lib.sh\r
131 > @@ -318,7 +318,11 @@ generate_message ()\r
132 >      fi\r
133 >  \r
134 >      if [ -z "${template[subject]}" ]; then\r
135 > -     template[subject]="Test message #${gen_msg_cnt}"\r
136 > +     if [ -n "$test_subtest_name" ]; then\r
137 > +         template[subject]="$test_subtest_name"\r
138 > +     else\r
139 > +         template[subject]="Test message #${gen_msg_cnt}"\r
140 > +     fi\r
141 >      fi\r
142 >  \r
143 >      if [ -z "${template[date]}" ]; then\r
144 > -- \r
145 > 1.7.8.3\r
146\r
147 > _______________________________________________\r
148 > notmuch mailing list\r
149 > notmuch@notmuchmail.org\r
150 > http://notmuchmail.org/mailman/listinfo/notmuch\r