Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 5C388431FD0 for ; Wed, 21 Dec 2011 14:09:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.1 X-Spam-Level: X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BgXiv88of+B7 for ; Wed, 21 Dec 2011 14:09:26 -0800 (PST) Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222]) by olra.theworths.org (Postfix) with ESMTP id 47EC7431FB6 for ; Wed, 21 Dec 2011 14:09:26 -0800 (PST) Received: from odin.local (nancy.schnouki.net [78.238.0.45]) by ks3536.kimsufi.com (Postfix) with ESMTPSA id 42CB16A0026; Wed, 21 Dec 2011 23:09:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net; s=key-schnouki; t=1324505365; bh=wLADKDmxCzm0S5TF0vh8HP72caTnl7ZGxm+Z+jAPaQk=; h=From:To:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=JdPV2DVPM/bb6Bc8UA1fEK3cUJDgxO2zSj73ZSYPrVa0WxPzy/e3DRz2x5SESXLqF WmWwOVWC7izx0+JaqRjxZ79NB8qx7RAnTlZfPMJNillyG1uDDpfppZRu5khiRBKUPc u9TdxmAqJmA7aZhonEck63kO1SaEbOSdkBTxgl7Y= From: Thomas Jost To: Dmitry Kurochkin , notmuch@notmuchmail.org Subject: Re: [PATCH 2/2] test: add test for `notmuch-hello-refresh-hook' In-Reply-To: <87d3bh7fqq.fsf@gmail.com> References: <1324491506-1134-1-git-send-email-dmitry.kurochkin@gmail.com> <1324491506-1134-2-git-send-email-dmitry.kurochkin@gmail.com> <87ipl9k33a.fsf@schnouki.net> <87d3bh7fqq.fsf@gmail.com> User-Agent: Notmuch/0.10.2+131~gde16f21 (http://notmuchmail.org) Emacs/24.0.92.1 (x86_64-unknown-linux-gnu) Date: Wed, 21 Dec 2011 23:09:24 +0100 Message-ID: <87d3bhk25n.fsf@schnouki.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 22:09:28 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Thu, 22 Dec 2011 01:54:21 +0400, Dmitry Kurochkin wrote: > On Wed, 21 Dec 2011 22:49:13 +0100, Thomas Jost w= rote: > > On Wed, 21 Dec 2011 22:18:26 +0400, Dmitry Kurochkin wrote: > > > Test that `notmuch-hello-refresh-hook' is called once when > > > `notmuch-hello' is called and twice when calling > > > `notmuch-hello-update' after that. > > >=20 > > > The tests are very similar to tests for `notmuch-hello-mode-hook'. > >=20 > > Quite nice, better than what I sent earlier [1] :) > >=20 > > However I'm not sure that notmuch-hello.el is the right place for this > > kind of stuff; notmuch-lib.el may be better (so that it can also be used > > in other hooks. > >=20 >=20 > These patches do not touch notmuch-hello.el. The functions are added to > test/test-lib.el. Wow. So apparently 22:49 is too late for me to read correctly. Full ACK for me then! Regards, Thomas >=20 > Regards, > Dmitry >=20 > > Regards, > > Thomas > >=20 > > [1] id:"1324473189-8622-1-git-send-email-schnouki@schnouki.net" > >=20 > >=20 > > > --- > > > test/emacs | 19 +++++++++++++++++++ > > > test/test-lib.el | 1 + > > > 2 files changed, 20 insertions(+), 0 deletions(-) > > >=20 > > > diff --git a/test/emacs b/test/emacs > > > index dffad0f..ca82445 100755 > > > --- a/test/emacs > > > +++ b/test/emacs > > > @@ -495,4 +495,23 @@ counter=3D$(test_emacs \ > > > ) > > > test_expect_equal "$counter" 1 > > >=20=20 > > > +test_begin_subtest "notmuch-hello-refresh hook is called" > > > +counter=3D$(test_emacs \ > > > + '(let ((notmuch-hello-refresh-hook-counter 0)) > > > + (kill-buffer "*notmuch-hello*") > > > + (notmuch-hello) > > > + notmuch-hello-refresh-hook-counter)' > > > +) > > > +test_expect_equal "$counter" 1 > > > + > > > +test_begin_subtest "notmuch-hello-refresh hook is called on updates" > > > +counter=3D$(test_emacs \ > > > + '(let ((notmuch-hello-refresh-hook-counter 0)) > > > + (kill-buffer "*notmuch-hello*") > > > + (notmuch-hello) > > > + (notmuch-hello-update) > > > + notmuch-hello-refresh-hook-counter)' > > > +) > > > +test_expect_equal "$counter" 2 > > > + > > > test_done > > > diff --git a/test/test-lib.el b/test/test-lib.el > > > index 83b8a65..3b817c3 100644 > > > --- a/test/test-lib.el > > > +++ b/test/test-lib.el > > > @@ -75,3 +75,4 @@ nothing." > > > (add-hook hook (apply-partially 'hook-counter hook))) > > >=20=20 > > > (add-hook-counter 'notmuch-hello-mode-hook) > > > +(add-hook-counter 'notmuch-hello-refresh-hook) > > > --=20 > > > 1.7.7.3 > > >=20 > > > _______________________________________________ > > > notmuch mailing list > > > notmuch@notmuchmail.org > > > http://notmuchmail.org/mailman/listinfo/notmuch > >=20 > > --=20 > > Thomas/Schnouki =2D-=20 Thomas/Schnouki --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJO8lkUAAoJEMPdciX+bh5IXSoH/16eKZ0qCedaZgLI3uzx5ygi /LJpaeilpMPDQLtHilQuKs6sUsMGPeD4af2TTY2219zT7x/2iYiO/TJz3qwRNTj3 tdwUOQ01w1hIUpAyv3h4eLcB4Ty1YotonkFIz9Xtx0a7nUGm2WGWVJnYvslkvXkn dJWHgIL8xtiqk8OhKitVfJ6l1HUU8PMIKOk0G6SHD0f90c3F1PnbQECv/iXmNs+I BW73v4tQQKTON2BEX2narwS8eI0nhRS9GO9OGHGktBsMNzUaCf1qoh2iyY/cI0Pm uodmV/WuBav97/L4AGITjLLnCyhSsPGbpGRASxhXGXXjUWQiO2KSl2mQzcMiIlU= =6FAb -----END PGP SIGNATURE----- --=-=-=--