Re: [PATCH 00/17] nmbug-status: Python-3-compabitility and general refactoring
[notmuch-archives.git] / 8b / d01f5e114dd25bbcb1edf898e41035a474fe08
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 D456B431FAF\r
6         for <notmuch@notmuchmail.org>; Fri, 31 Aug 2012 00:53:46 -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 UhyVsXSnHZ5w for <notmuch@notmuchmail.org>;\r
16         Fri, 31 Aug 2012 00:53:46 -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 3151A431FAE\r
19         for <notmuch@notmuchmail.org>; Fri, 31 Aug 2012 00:53:46 -0700 (PDT)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id 3F34A100030;\r
22         Fri, 31 Aug 2012 10:53:54 +0300 (EEST)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: Austin Clements <amdragon@MIT.EDU>, david@tethera.net\r
25 Subject: Re: [PATCH] test: use (format "%S") to print nil in emacs test.\r
26 In-Reply-To: <20120831035227.GH11179@mit.edu>\r
27 References: <1346375399-449-1-git-send-email-david@tethera.net>\r
28         <20120831035227.GH11179@mit.edu>\r
29 User-Agent: Notmuch/0.14+11~gd9bf007 (http://notmuchmail.org) Emacs/24.1.1\r
30         (x86_64-unknown-linux-gnu)\r
31 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
32         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
33         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
34 Date: Fri, 31 Aug 2012 10:53:54 +0300\r
35 Message-ID: <m23933lcod.fsf@guru.guru-group.fi>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain\r
38 Cc: notmuch@notmuchmail.org, David Bremner <bremner@debian.org>\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Fri, 31 Aug 2012 07:53:47 -0000\r
52 \r
53 On Fri, Aug 31 2012, Austin Clements <amdragon@MIT.EDU> wrote:\r
54 \r
55 > LGTM.  Alternatively, the test could be\r
56 >   (null (notmuch-wash....))\r
57 > with the correct answer being 't'.  That would avoid the awkward\r
58 > detour through a string, but either way is good as long as this test\r
59 > passes.\r
60 \r
61 I was going to vote this (null ... thing) but as the function returns\r
62 nil when no match found it is more obvious th compare for that instead\r
63 of "t".\r
64 \r
65 And, there is not much of a detour for the expected value nil, outputted\r
66 as "nil" (without quotes) :).\r
67 \r
68 So: \r
69 \r
70 LGTM. "Alternatively, the test could" use (prin1 (...)) directly,\r
71 "but either way is good as long as this test passes."\r
72 \r
73 Tomi\r
74 \r
75 >\r
76 > Quoth david@tethera.net on Aug 30 at 10:09 pm:\r
77 >> From: David Bremner <bremner@debian.org>\r
78 >> \r
79 >> The behaviour of "emacsclient --eval nil" changed from emacs23 to\r
80 >> emacs24, and in emacs24 it prints 'nil' rather than an empty string.\r
81 >> \r
82 >> (format "%S" foo) produces a sexpr form of foo, and is consistent\r
83 >> between the two versions.\r
84 >> ---\r
85 >> \r
86 >> This fixes another test failure on emacs24. \r
87 >> \r
88 >> I guess maybe all test_emacs output could be canonicalized this way,\r
89 >> but I suspect that would be pretty disruptive.\r
90 >> \r
91 >>  test/emacs-subject-to-filename |    6 +++---\r
92 >>  1 file changed, 3 insertions(+), 3 deletions(-)\r
93 >> \r
94 >> diff --git a/test/emacs-subject-to-filename b/test/emacs-subject-to-filename\r
95 >> index 176e685..a0ffdfe 100755\r
96 >> --- a/test/emacs-subject-to-filename\r
97 >> +++ b/test/emacs-subject-to-filename\r
98 >> @@ -8,10 +8,10 @@ test_emacs '(ignore)'\r
99 >>  \r
100 >>  # test notmuch-wash-subject-to-patch-sequence-number (subject)\r
101 >>  test_begin_subtest "no patch sequence number"\r
102 >> -output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number\r
103 >> -      "[PATCH] A normal patch subject without numbers")'\r
104 >> +output=$(test_emacs '(format "%S" (notmuch-wash-subject-to-patch-sequence-number\r
105 >> +      "[PATCH] A normal patch subject without numbers"))'\r
106 >>  )\r
107 >> -test_expect_equal "$output" ""\r
108 >> +test_expect_equal "$output" '"nil"'\r
109 >>  \r
110 >>  test_begin_subtest "patch sequence number #1"\r
111 >>  output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number\r
112 > _______________________________________________\r
113 > notmuch mailing list\r
114 > notmuch@notmuchmail.org\r
115 > http://notmuchmail.org/mailman/listinfo/notmuch\r