Re: [PATCH] create .mailmap file (for git shortlog/blame)
[notmuch-archives.git] / a4 / a2018185e608b6a89f8a1e2959cf6d156cc394
1 Return-Path: <dmitry.kurochkin@gmail.com>\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 888F4431FBF\r
6         for <notmuch@notmuchmail.org>; Tue, 24 Jan 2012 07:46:26 -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.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id HoPA-ZqMYnis for <notmuch@notmuchmail.org>;\r
17         Tue, 24 Jan 2012 07:46:26 -0800 (PST)\r
18 Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com\r
19         [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id BA82B431FBC\r
22         for <notmuch@notmuchmail.org>; Tue, 24 Jan 2012 07:46:25 -0800 (PST)\r
23 Received: by bkbzt19 with SMTP id zt19so2494443bkb.26\r
24         for <notmuch@notmuchmail.org>; Tue, 24 Jan 2012 07:46:24 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
27         :mime-version:content-type;\r
28         bh=GHaqwCqTkHnrJsu6HXOgqbvWLLZLBrZQfm+7qKRDep4=;\r
29         b=l+VGU4fCB5rH7RzT7irdL70WrN6phUeLiAjHu7kvyM3RsMaXzGtF+XMw+tCtqQu/Qk\r
30         4ZQlZ0JCjQMMDZ24D3tdxAA0oi9wKh/mlN+6OIFx/HWPNzNYjpMGaR/oYz2JPH5ugR/K\r
31         w2KsCKUyctsZF+sZLgU9uutohGuS3bBP00JuA=\r
32 Received: by 10.204.195.130 with SMTP id ec2mr5322358bkb.106.1327419984423;\r
33         Tue, 24 Jan 2012 07:46:24 -0800 (PST)\r
34 Received: from localhost ([91.144.186.21])\r
35         by mx.google.com with ESMTPS id ek9sm37129348bkb.10.2012.01.24.07.46.23\r
36         (version=TLSv1/SSLv3 cipher=OTHER);\r
37         Tue, 24 Jan 2012 07:46:23 -0800 (PST)\r
38 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
39 To: David Edmondson <dme@dme.org>, notmuch@notmuchmail.org\r
40 Subject: Re: [PATCH 3/4 v42] test: Add more helpers for emacs tests.\r
41 In-Reply-To: <1327341947-29206-3-git-send-email-dme@dme.org>\r
42 References: <1326804748-8989-2-git-send-email-dme@dme.org>\r
43         <1327341947-29206-1-git-send-email-dme@dme.org>\r
44         <1327341947-29206-3-git-send-email-dme@dme.org>\r
45 User-Agent: Notmuch/0.11+100~gd650abf (http://notmuchmail.org) Emacs/23.3.1\r
46         (x86_64-pc-linux-gnu)\r
47 Date: Tue, 24 Jan 2012 19:45:18 +0400\r
48 Message-ID: <8762g1m7e9.fsf@gmail.com>\r
49 MIME-Version: 1.0\r
50 Content-Type: text/plain; charset=us-ascii\r
51 X-BeenThere: notmuch@notmuchmail.org\r
52 X-Mailman-Version: 2.1.13\r
53 Precedence: list\r
54 List-Id: "Use and development of the notmuch mail system."\r
55         <notmuch.notmuchmail.org>\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
59 List-Post: <mailto:notmuch@notmuchmail.org>\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
63 X-List-Received-Date: Tue, 24 Jan 2012 15:46:26 -0000\r
64 \r
65 On Mon, 23 Jan 2012 18:05:46 +0000, David Edmondson <dme@dme.org> wrote:\r
66 > ---\r
67\r
68 > Split out from the tests and re-factored.\r
69\r
70 >  test/test-lib.el |   22 ++++++++++++++++++++++\r
71 >  1 files changed, 22 insertions(+), 0 deletions(-)\r
72\r
73 > diff --git a/test/test-lib.el b/test/test-lib.el\r
74 > index 96752f0..c4a5db4 100644\r
75 > --- a/test/test-lib.el\r
76 > +++ b/test/test-lib.el\r
77 > @@ -20,6 +20,8 @@\r
78 >  ;;\r
79 >  ;; Authors: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
80 >  \r
81 > +(require 'cl)        ;; This code is generally used uncompiled.\r
82 > +\r
83 >  ;; `read-file-name' by default uses `completing-read' function to read\r
84 >  ;; user input.  It does not respect `standard-input' variable which we\r
85 >  ;; use in tests to provide user input.  So replace it with a plain\r
86 > @@ -92,3 +94,23 @@ nothing."\r
87 >                  result\r
88 >                (prin1-to-string result)))\r
89 >         (test-output))))\r
90 > +\r
91 > +(defun notmuch-test-report-unexpected (output expected)\r
92 > +  "Report that the OUTPUT does not match the EXPECTED result."\r
93 > +  (concat "Expect:\t" (prin1-to-string expected) "\n"\r
94 > +       "Output:\t" (prin1-to-string output) "\n"))\r
95 > +\r
96 > +(defun notmuch-test-compare (output expected)\r
97 > +  "Compare OUTPUT with EXPECTED. Report any discrepencies."\r
98 > +  (if (equal output expected)\r
99 > +      t\r
100 > +    (cond\r
101 > +     ((and (listp output)\r
102 > +        (listp expected))\r
103 > +      (apply #'concat (loop for o in output\r
104 > +                         for e in expected\r
105 > +                         if (not (equal o e))\r
106 > +                         collect (notmuch-test-report-unexpected o e))))\r
107 > +   \r
108 > +     (t\r
109 > +      (notmuch-test-report-unexpected output expected)))))\r
110 \r
111 As we discussed it on IRC, I have two comments on the above code:\r
112 \r
113 1. rename notmuch-test-compare to notmuch-test-expect-equal\r
114 \r
115 2. move the top level equal check to the non-list branch\r
116 \r
117 But both of these are subjective and minor, so I leave it to David to\r
118 decide whether to change or ignore them.  Otherwise, the patch looks\r
119 good to me.\r
120 \r
121 \r
122 While replying to this email, I noticed a trailing whitespace.  I may\r
123 have missed them in other patches.  David, can you please check for\r
124 trailing white spaces and clean them?\r
125 \r
126 Regards,\r
127   Dmitry\r
128 \r
129 > -- \r
130 > 1.7.8.3\r
131\r
132 > _______________________________________________\r
133 > notmuch mailing list\r
134 > notmuch@notmuchmail.org\r
135 > http://notmuchmail.org/mailman/listinfo/notmuch\r