Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 44 / 1345e9e5e14173fcad1d2acdadc0927c55350f
1 Return-Path: <dme@dme.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 5369A431FB6\r
6         for <notmuch@notmuchmail.org>; Fri, 30 Dec 2011 01:39:47 -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 eaXHXO8HRvYa for <notmuch@notmuchmail.org>;\r
16         Fri, 30 Dec 2011 01:39:46 -0800 (PST)\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
18  [74.125.82.45])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
19  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
20  1D595431FD0    for <notmuch@notmuchmail.org>; Fri, 30 Dec 2011 01:39:45 -0800\r
21  (PST)\r
22 Received: by wgbds13 with SMTP id ds13so19851416wgb.2\r
23         for <notmuch@notmuchmail.org>; Fri, 30 Dec 2011 01:39:45 -0800 (PST)\r
24 Received: by 10.227.208.81 with SMTP id gb17mr38355354wbb.26.1325237984063;\r
25         Fri, 30 Dec 2011 01:39:44 -0800 (PST)\r
26 Received: from hotblack-desiato.hh.sledj.net\r
27         (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])\r
28         by mx.google.com with ESMTPS id p2sm38862860wbh.22.2011.12.30.01.39.42\r
29         (version=TLSv1/SSLv3 cipher=OTHER);\r
30         Fri, 30 Dec 2011 01:39:43 -0800 (PST)\r
31 Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)\r
32         id EAE66A09B7; Fri, 30 Dec 2011 09:39:40 +0000 (GMT)\r
33 From: David Edmondson <dme@dme.org>\r
34 To: notmuch@notmuchmail.org\r
35 Subject: [PATCH 2/3 v2] test: Add tests for `notmuch-show-clean-address'.\r
36 Date: Fri, 30 Dec 2011 09:39:37 +0000\r
37 Message-Id: <1325237978-22893-2-git-send-email-dme@dme.org>\r
38 X-Mailer: git-send-email 1.7.7.3\r
39 In-Reply-To: <1325237978-22893-1-git-send-email-dme@dme.org>\r
40 References: <1324980940-25466-1-git-send-email-dme@dme.org>\r
41         <1325237978-22893-1-git-send-email-dme@dme.org>\r
42 MIME-Version: 1.0\r
43 Content-Type: text/plain; charset=UTF-8\r
44 Content-Transfer-Encoding: 8bit\r
45 X-BeenThere: notmuch@notmuchmail.org\r
46 X-Mailman-Version: 2.1.13\r
47 Precedence: list\r
48 List-Id: "Use and development of the notmuch mail system."\r
49         <notmuch.notmuchmail.org>\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
53 List-Post: <mailto:notmuch@notmuchmail.org>\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
57 X-List-Received-Date: Fri, 30 Dec 2011 09:39:47 -0000\r
58 \r
59 ---\r
60 \r
61 Added backslash test. UTF8 round-trip still isn't right.\r
62 \r
63  test/emacs                                         |   20 ++++++++++++++++++++\r
64  .../notmuch-address-simplification                 |   10 ++++++++++\r
65  2 files changed, 30 insertions(+), 0 deletions(-)\r
66  create mode 100644 test/emacs.expected-output/notmuch-address-simplification\r
67 \r
68 diff --git a/test/emacs b/test/emacs\r
69 index a06c223..69738cd 100755\r
70 --- a/test/emacs\r
71 +++ b/test/emacs\r
72 @@ -514,4 +514,24 @@ counter=$(test_emacs \\r
73  )\r
74  test_expect_equal "$counter" 2\r
75  \r
76 +test_begin_subtest "notmuch-show address simplification"\r
77 +test_emacs '\r
78 +(with-temp-buffer\r
79 +  (let ((input (list\r
80 +"foo@bar.com"\r
81 +"<foo@bar.com>"\r
82 +"Foo Bar <foo@bar.com>"\r
83 +"foo@bar.com <foo@bar.com>"\r
84 +"ДБ <db-uknot@stop.me.uk>"\r
85 +"foo (at home) <foo@bar.com>"\r
86 +"foo [at home] <foo@bar.com>"\r
87 +"\"Foo Bar\" <foo@bar.com>"\r
88 +"Foo Bar"\r
89 +"Fred Dibna \\[extraordinaire\\] <fred@dibna.com>"\r
90 +               )))\r
91 +    (mapc (lambda (a) (insert (notmuch-show-clean-address a) "\n")) input))\r
92 +  (test-output))\r
93 +'\r
94 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-address-simplification\r
95 +\r
96  test_done\r
97 diff --git a/test/emacs.expected-output/notmuch-address-simplification b/test/emacs.expected-output/notmuch-address-simplification\r
98 new file mode 100644\r
99 index 0000000..4747827\r
100 --- /dev/null\r
101 +++ b/test/emacs.expected-output/notmuch-address-simplification\r
102 @@ -0,0 +1,10 @@\r
103 +foo@bar.com\r
104 +foo@bar.com\r
105 +Foo Bar <foo@bar.com>\r
106 +foo@bar.com\r
107 +ДБ <db-uknot@stop.me.uk>\r
108 +foo (at home) <foo@bar.com>\r
109 +foo [at home] <foo@bar.com>\r
110 +Foo Bar <foo@bar.com>\r
111 +Foo Bar\r
112 +Fred Dibna [extraordinaire] <fred@dibna.com>\r
113 -- \r
114 1.7.7.3\r
115 \r