[PATCH 1/7] cli/reply: push notmuch reply format abstraction lower in the stack
[notmuch-archives.git] / 2b / f27ed4ee459a918a58514e2be7df29b1ea86f6
1 Return-Path: <schnouki@schnouki.net>\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 86F3B429E25\r
6         for <notmuch@notmuchmail.org>; Wed, 21 Dec 2011 13:49:21 -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.1\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1]\r
13         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 GFegej5LHBfT for <notmuch@notmuchmail.org>;\r
17         Wed, 21 Dec 2011 13:49:20 -0800 (PST)\r
18 Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222])\r
19         by olra.theworths.org (Postfix) with ESMTP id 6A4B0431FB6\r
20         for <notmuch@notmuchmail.org>; Wed, 21 Dec 2011 13:49:20 -0800 (PST)\r
21 Received: from odin.local (nancy.schnouki.net [78.238.0.45])\r
22         by ks3536.kimsufi.com (Postfix) with ESMTPSA id 1830B6A0026;\r
23         Wed, 21 Dec 2011 22:49:19 +0100 (CET)\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;\r
25         s=key-schnouki; t=1324504159;\r
26         bh=9oHQXcLY15ZACejqDvyuVwuquj1oTuWUtLhNe6U/rdQ=;\r
27         h=From:To:Subject:In-Reply-To:References:Date:Message-ID:\r
28         MIME-Version:Content-Type;\r
29         b=dNpxwkJUT+aeRU58vKwNFxxogoDCWQX+fYxfY6jSrlN+qUZ9eSkASkUMNZB0FTQcO\r
30         RJBDjRc9JVvOVRnXr6QTB+Aqmws5PsndtnKSKfVjdoA8X4zOuNPHgeOExyfhfZb7ed\r
31         iAUUED22pw7tr8EdErYJe97jLEI8MyzJTrNnaQ8w=\r
32 From: Thomas Jost <schnouki@schnouki.net>\r
33 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>, notmuch@notmuchmail.org\r
34 Subject: Re: [PATCH 2/2] test: add test for `notmuch-hello-refresh-hook'\r
35 In-Reply-To: <1324491506-1134-2-git-send-email-dmitry.kurochkin@gmail.com>\r
36 References: <1324491506-1134-1-git-send-email-dmitry.kurochkin@gmail.com>\r
37         <1324491506-1134-2-git-send-email-dmitry.kurochkin@gmail.com>\r
38 User-Agent: Notmuch/0.10.2+131~gde16f21 (http://notmuchmail.org)\r
39         Emacs/24.0.92.1 (x86_64-unknown-linux-gnu)\r
40 Date: Wed, 21 Dec 2011 22:49:13 +0100\r
41 Message-ID: <87ipl9k33a.fsf@schnouki.net>\r
42 MIME-Version: 1.0\r
43 Content-Type: multipart/signed; boundary="=-=-=";\r
44         micalg=pgp-sha1; protocol="application/pgp-signature"\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: Wed, 21 Dec 2011 21:49:21 -0000\r
58 \r
59 --=-=-=\r
60 Content-Type: text/plain\r
61 Content-Transfer-Encoding: quoted-printable\r
62 \r
63 On Wed, 21 Dec 2011 22:18:26 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmai=\r
64 l.com> wrote:\r
65 > Test that `notmuch-hello-refresh-hook' is called once when\r
66 > `notmuch-hello' is called and twice when calling\r
67 > `notmuch-hello-update' after that.\r
68 >=20\r
69 > The tests are very similar to tests for `notmuch-hello-mode-hook'.\r
70 \r
71 Quite nice, better than what I sent earlier [1] :)\r
72 \r
73 However I'm not sure that notmuch-hello.el is the right place for this\r
74 kind of stuff; notmuch-lib.el may be better (so that it can also be used\r
75 in other hooks.\r
76 \r
77 Regards,\r
78 Thomas\r
79 \r
80 [1] id:"1324473189-8622-1-git-send-email-schnouki@schnouki.net"\r
81 \r
82 \r
83 > ---\r
84 >  test/emacs       |   19 +++++++++++++++++++\r
85 >  test/test-lib.el |    1 +\r
86 >  2 files changed, 20 insertions(+), 0 deletions(-)\r
87 >=20\r
88 > diff --git a/test/emacs b/test/emacs\r
89 > index dffad0f..ca82445 100755\r
90 > --- a/test/emacs\r
91 > +++ b/test/emacs\r
92 > @@ -495,4 +495,23 @@ counter=3D$(test_emacs \\r
93 >  )\r
94 >  test_expect_equal "$counter" 1\r
95 >=20=20\r
96 > +test_begin_subtest "notmuch-hello-refresh hook is called"\r
97 > +counter=3D$(test_emacs \\r
98 > +    '(let ((notmuch-hello-refresh-hook-counter 0))\r
99 > +       (kill-buffer "*notmuch-hello*")\r
100 > +       (notmuch-hello)\r
101 > +       notmuch-hello-refresh-hook-counter)'\r
102 > +)\r
103 > +test_expect_equal "$counter" 1\r
104 > +\r
105 > +test_begin_subtest "notmuch-hello-refresh hook is called on updates"\r
106 > +counter=3D$(test_emacs \\r
107 > +    '(let ((notmuch-hello-refresh-hook-counter 0))\r
108 > +       (kill-buffer "*notmuch-hello*")\r
109 > +       (notmuch-hello)\r
110 > +       (notmuch-hello-update)\r
111 > +       notmuch-hello-refresh-hook-counter)'\r
112 > +)\r
113 > +test_expect_equal "$counter" 2\r
114 > +\r
115 >  test_done\r
116 > diff --git a/test/test-lib.el b/test/test-lib.el\r
117 > index 83b8a65..3b817c3 100644\r
118 > --- a/test/test-lib.el\r
119 > +++ b/test/test-lib.el\r
120 > @@ -75,3 +75,4 @@ nothing."\r
121 >    (add-hook hook (apply-partially 'hook-counter hook)))\r
122 >=20=20\r
123 >  (add-hook-counter 'notmuch-hello-mode-hook)\r
124 > +(add-hook-counter 'notmuch-hello-refresh-hook)\r
125 > --=20\r
126 > 1.7.7.3\r
127 >=20\r
128 > _______________________________________________\r
129 > notmuch mailing list\r
130 > notmuch@notmuchmail.org\r
131 > http://notmuchmail.org/mailman/listinfo/notmuch\r
132 \r
133 =2D-=20\r
134 Thomas/Schnouki\r
135 \r
136 --=-=-=\r
137 Content-Type: application/pgp-signature\r
138 \r
139 -----BEGIN PGP SIGNATURE-----\r
140 Version: GnuPG v1.4.11 (GNU/Linux)\r
141 \r
142 iQEcBAEBAgAGBQJO8lRZAAoJEMPdciX+bh5IhBIH/0940E8MabvAHXfDGp0zRDa0\r
143 TZAJYzGcnfFiwE0a3q7ryLHtavqVsqbCh4jQsdfDWY69gw0DPfiSV8tBK6lUT9fj\r
144 D2pO5eAIcGBleZJmmen5eX2zXEn1gQFYzgT9oGWt0SYLTzNQ36YVwVYa3AZxsMYJ\r
145 DNqV+q1OQttrJ2VXI5bnSuW8HE4k9xZRvvJqSq0FOY8A98ukk8M6tcpsQYLQJp+1\r
146 SbuvSy/h/anjNHqPj+iDc0iZ78Xyq6FlXzMea+2rC6dpWzuZfIhVdpx9yyFZHvsm\r
147 tsBbzrh0XTonZQJ+LU2tTPc//wEZpFwtRMhszXgl/T6O8EMe99IWsIlVFHdBYUg=\r
148 =US3y\r
149 -----END PGP SIGNATURE-----\r
150 --=-=-=--\r