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 0B610429E28
\r
6 for <notmuch@notmuchmail.org>; Wed, 21 Dec 2011 05:13:19 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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
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 MET3aVTGiOmy for <notmuch@notmuchmail.org>;
\r
17 Wed, 21 Dec 2011 05:13:18 -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 6A38E431FB6
\r
20 for <notmuch@notmuchmail.org>; Wed, 21 Dec 2011 05:13:18 -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 4E7CC6A0026;
\r
23 Wed, 21 Dec 2011 14:13:17 +0100 (CET)
\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;
\r
25 s=key-schnouki; t=1324473197;
\r
26 bh=jLJiSeX4vE3ONwB4NLEOneQLUbdVXGKPyI4h970egIE=;
\r
27 h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References;
\r
28 b=j8EohwjR2p30BeCv5KoeAsT5kqflyg3T0X5QjehDv54l7ic+dHkvHA8iUkZd1kQhH
\r
29 P7SCagg7kzuJ7o2R9I+tJ6MHTyZ6UBHhcZiDMaSiJ6ubydhMNJEosdewTCxE0ijetK
\r
30 nl93anW/8YzEM6SfDOzZcIvKJchDbpXqjYwiHrlQ=
\r
31 From: Thomas Jost <schnouki@schnouki.net>
\r
32 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
33 Subject: [PATCH] test: add tests for `notmuch-hello-refresh-hook'
\r
34 Date: Wed, 21 Dec 2011 14:13:09 +0100
\r
35 Message-Id: <1324473189-8622-1-git-send-email-schnouki@schnouki.net>
\r
36 X-Mailer: git-send-email 1.7.8
\r
37 In-Reply-To: <87iplawvx5.fsf@gmail.com>
\r
38 References: <87iplawvx5.fsf@gmail.com>
\r
39 Cc: notmuch@notmuchmail.org
\r
40 X-BeenThere: notmuch@notmuchmail.org
\r
41 X-Mailman-Version: 2.1.13
\r
43 List-Id: "Use and development of the notmuch mail system."
\r
44 <notmuch.notmuchmail.org>
\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
48 List-Post: <mailto:notmuch@notmuchmail.org>
\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
52 X-List-Received-Date: Wed, 21 Dec 2011 13:13:19 -0000
\r
54 Test that it's called once when `notmuch-hello' is called, and twice when
\r
55 calling `notmuch-hello-update' after that.
\r
57 Here it is. No broken subtest first since the first patch was already pushed
\r
63 test/emacs | 23 +++++++++++++++++++++++
\r
64 1 files changed, 23 insertions(+), 0 deletions(-)
\r
66 diff --git a/test/emacs b/test/emacs
\r
67 index dffad0f..94b9171 100755
\r
70 @@ -495,4 +495,27 @@ counter=$(test_emacs \
\r
72 test_expect_equal "$counter" 1
\r
74 +test_begin_subtest "notmuch-hello-refresh-hook is called"
\r
75 +counter=$(test_emacs \
\r
76 + "(let ((refresh-hook-counter 0)
\r
77 + (notmuch-hello-refresh-hook nil))
\r
78 + (kill-buffer \"*notmuch-hello*\")
\r
79 + (add-hook 'notmuch-hello-refresh-hook (lambda () (incf refresh-hook-counter)))
\r
81 + refresh-hook-counter)"
\r
83 +test_expect_equal "$counter" 1
\r
85 +test_begin_subtest "notmuch-hello-refresh-hook is called on updates"
\r
86 +counter=$(test_emacs \
\r
87 + "(let ((refresh-hook-counter 0)
\r
88 + (notmuch-hello-refresh-hook nil))
\r
89 + (kill-buffer \"*notmuch-hello*\")
\r
90 + (add-hook 'notmuch-hello-refresh-hook (lambda () (incf refresh-hook-counter)))
\r
92 + (notmuch-hello-update)
\r
93 + refresh-hook-counter)"
\r
95 +test_expect_equal "$counter" 2
\r