Re: [feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / 88 / faf449df77873f9b5c20d5d9580971628b28ff
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 arlo.cworth.org (Postfix) with ESMTP id 87CA76DE02D2\r
6  for <notmuch@notmuchmail.org>; Fri, 25 Sep 2015 10:08:31 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.521\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.521 tagged_above=-999 required=5 tests=[AWL=0.199,\r
12   RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01]\r
13  autolearn=disabled\r
14 Received: from arlo.cworth.org ([127.0.0.1])\r
15  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
16  with ESMTP id pJUtgyT3F1Pl for <notmuch@notmuchmail.org>;\r
17  Fri, 25 Sep 2015 10:08:28 -0700 (PDT)\r
18 Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com\r
19  [209.85.212.173])\r
20  by arlo.cworth.org (Postfix) with ESMTPS id 609A96DE0298\r
21  for <notmuch@notmuchmail.org>; Fri, 25 Sep 2015 10:08:28 -0700 (PDT)\r
22 Received: by wicge5 with SMTP id ge5so29495462wic.0\r
23  for <notmuch@notmuchmail.org>; Fri, 25 Sep 2015 10:08:27 -0700 (PDT)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25  d=1e100.net; s=20130820;\r
26  h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to\r
27  :references:mime-version:content-type:content-transfer-encoding;\r
28  bh=Brcvb2k1mB8bqhvGDXHlWeDyVmPTCaHt1TlEi3eXIyA=;\r
29  b=R75ipx4uCsxSQ0c0VuzJHfzuy3F8Y6CLTgWFA3Gel8eE50o6gJj0KF0fcoJmr0PiCX\r
30  TM1DvnSBejKCR0ezofI2fwt0H2w/t/N77PJkJNy/YwJYuiXzWW00LCcTuItViGt590Hl\r
31  GDgcpK8ekadSQ6sI7nSG8UsQ6Dt9CNXfx3MoV/LUNdmWh2v1wLM1VhqWTwGFEROugLR/\r
32  QTGLz+IRdqM27Nq2K9IwEdHb296g9yTD204260mE+b3gbpoEqMDBaCw/b1enWUpJtVe7\r
33  99Pi1vQ+H53UiN25JNv/7pfhHMYNnsuQ+dhjrgoTObJHHpyq5+qV579X46HsitAptSjr\r
34  9ICw==\r
35 X-Gm-Message-State:\r
36  ALoCoQmBs5USjspCRVk4dvu7pnR4JfapbKm21nnOn4FoRncfFLOuhFYLz89Qioer3rA5BxlJ2D6N\r
37 X-Received: by 10.194.83.70 with SMTP id o6mr7418689wjy.44.1443200906920;\r
38  Fri, 25 Sep 2015 10:08:26 -0700 (PDT)\r
39 Received: from localhost (mobile-access-bcee63-221.dhcp.inet.fi.\r
40  [188.238.99.221])\r
41  by smtp.gmail.com with ESMTPSA id 12sm4272173wjw.15.2015.09.25.10.08.26\r
42  (version=TLSv1/SSLv3 cipher=OTHER);\r
43  Fri, 25 Sep 2015 10:08:26 -0700 (PDT)\r
44 From: Jani Nikula <jani@nikula.org>\r
45 To: David Bremner <david@tethera.net>, Jani Nikula <jani@nikula.org>,\r
46  notmuch@notmuchmail.org\r
47 Subject: =?utf-8?q?=5BPATCH_v2_7=C2=BD/9=5D_test=3A_add_notmuch_address_--deduplicate=3D=28no=7Cmailbox=7Caddress=29_tests?=\r
48 Date: Fri, 25 Sep 2015 20:08:09 +0300\r
49 Message-Id: <1443200889-19053-1-git-send-email-jani@nikula.org>\r
50 X-Mailer: git-send-email 2.1.4\r
51 In-Reply-To: <87612z2wo7.fsf@zancas.localnet>\r
52 References: <87612z2wo7.fsf@zancas.localnet>\r
53 MIME-Version: 1.0\r
54 Content-Type: text/plain; charset=UTF-8\r
55 Content-Transfer-Encoding: 8bit\r
56 X-BeenThere: notmuch@notmuchmail.org\r
57 X-Mailman-Version: 2.1.18\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, 25 Sep 2015 17:08:31 -0000\r
69 \r
70 First a simple smoke test first, next generate messages with multiple\r
71 email address variants and check the behaviour of deduplication\r
72 schemes with these.\r
73 \r
74 ---\r
75 \r
76 v2: more variation in name parts of email addresses\r
77 ---\r
78  test/T095-address.sh | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++\r
79  1 file changed, 74 insertions(+)\r
80 \r
81 diff --git a/test/T095-address.sh b/test/T095-address.sh\r
82 index f8d902cb3a5e..a194faf3b842 100755\r
83 --- a/test/T095-address.sh\r
84 +++ b/test/T095-address.sh\r
85 @@ -215,4 +215,78 @@ notmuch@notmuchmail.org\r
86  EOF\r
87  test_expect_equal_file OUTPUT EXPECTED\r
88  \r
89 +test_begin_subtest "--deduplicate=address --output=sender --output=recipients"\r
90 +notmuch address --deduplicate=address --output=sender --output=recipients '*' | sort >OUTPUT\r
91 +cat <<EOF >EXPECTED\r
92 +"Discussion about the Arch User Repository (AUR)" <aur-general@archlinux.org>\r
93 +Adrian Perez de Castro <aperez@igalia.com>\r
94 +Alexander Botero-Lowry <alex.boterolowry@gmail.com>\r
95 +Allan McRae <allan@archlinux.org>\r
96 +Aron Griffis <agriffis@n01se.net>\r
97 +Carl Worth <cworth@cworth.org>\r
98 +Chris Wilson <chris@chris-wilson.co.uk>\r
99 +François Boulogne <boulogne.f@gmail.com>\r
100 +Ingmar Vanhassel <ingmar@exherbo.org>\r
101 +Israel Herraiz <isra@herraiz.org>\r
102 +Jan Janak <jan@ryngle.com>\r
103 +Jjgod Jiang <gzjjgod@gmail.com>\r
104 +Keith Packard <keithp@keithp.com>\r
105 +Lars Kellogg-Stedman <lars@seas.harvard.edu>\r
106 +Mikhail Gusarov <dottedmag@dottedmag.net>\r
107 +Olivier Berger <olivier.berger@it-sudparis.eu>\r
108 +Rolland Santimano <rollandsantimano@yahoo.com>\r
109 +Stewart Smith <stewart@flamingspork.com>\r
110 +notmuch@notmuchmail.org\r
111 +EOF\r
112 +test_expect_equal_file OUTPUT EXPECTED\r
113 +\r
114 +generate_message '[from]="Foo Bar <foo.bar@example.com>"'\r
115 +generate_message '[from]="Foo Bar <Foo.Bar@Example.Com>"'\r
116 +generate_message '[from]="Foo Bar <foo.bar@example.com>"'\r
117 +generate_message '[from]="Bar <Foo.Bar@Example.Com>"'\r
118 +generate_message '[from]="Foo <foo.bar@example.com>"'\r
119 +generate_message '[from]="<foo.bar@example.com>"'\r
120 +generate_message '[from]="foo.bar@example.com"'\r
121 +generate_message '[from]="Baz <foo.bar+baz@example.com>"'\r
122 +generate_message '[from]="Foo Bar <foo.bar+baz@example.com>"'\r
123 +generate_message '[from]="Baz <foo.bar+baz@example.com>"'\r
124 +notmuch new > /dev/null\r
125 +\r
126 +test_begin_subtest "--deduplicate=no --output=sender"\r
127 +notmuch address --deduplicate=no --output=sender from:example.com | sort >OUTPUT\r
128 +cat <<EOF >EXPECTED\r
129 +Bar <Foo.Bar@Example.Com>\r
130 +Baz <foo.bar+baz@example.com>\r
131 +Baz <foo.bar+baz@example.com>\r
132 +Foo <foo.bar@example.com>\r
133 +Foo Bar <Foo.Bar@Example.Com>\r
134 +Foo Bar <foo.bar+baz@example.com>\r
135 +Foo Bar <foo.bar@example.com>\r
136 +Foo Bar <foo.bar@example.com>\r
137 +foo.bar@example.com\r
138 +foo.bar@example.com\r
139 +EOF\r
140 +test_expect_equal_file OUTPUT EXPECTED\r
141 +\r
142 +test_begin_subtest "--deduplicate=mailbox --output=sender --output=count"\r
143 +notmuch address --deduplicate=mailbox --output=sender --output=count from:example.com | sort -n >OUTPUT\r
144 +cat <<EOF >EXPECTED\r
145 +1      Bar <Foo.Bar@Example.Com>\r
146 +1      Foo <foo.bar@example.com>\r
147 +1      Foo Bar <Foo.Bar@Example.Com>\r
148 +1      Foo Bar <foo.bar+baz@example.com>\r
149 +2      Baz <foo.bar+baz@example.com>\r
150 +2      Foo Bar <foo.bar@example.com>\r
151 +2      foo.bar@example.com\r
152 +EOF\r
153 +test_expect_equal_file OUTPUT EXPECTED\r
154 +\r
155 +test_begin_subtest "--deduplicate=address --output=sender --output=count"\r
156 +notmuch address --deduplicate=address --output=sender --output=count from:example.com | sort -n >OUTPUT\r
157 +cat <<EOF >EXPECTED\r
158 +3      Baz <foo.bar+baz@example.com>\r
159 +7      Foo Bar <foo.bar@example.com>\r
160 +EOF\r
161 +test_expect_equal_file OUTPUT EXPECTED\r
162 +\r
163  test_done\r
164 -- \r
165 2.1.4\r
166 \r