X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2Femacs;h=ca8244531e3eb76780c97dcee8ba865c275829e3;hb=dddbb9c4a84c4be348df941c4962c2edd281b4de;hp=a864ffa7a3856278154c3c8d393451b4a21ba96d;hpb=785028dc2e6bc165456d3c91c1ce3693e6a4cf05;p=notmuch diff --git a/test/emacs b/test/emacs index a864ffa7..ca824453 100755 --- a/test/emacs +++ b/test/emacs @@ -485,4 +485,33 @@ counter=$(test_emacs \ ) test_expect_equal "$counter" 1 +test_begin_subtest "notmuch-hello-mode hook is not called on updates" +counter=$(test_emacs \ + '(let ((notmuch-hello-mode-hook-counter 0)) + (kill-buffer "*notmuch-hello*") + (notmuch-hello) + (notmuch-hello-update) + notmuch-hello-mode-hook-counter)' +) +test_expect_equal "$counter" 1 + +test_begin_subtest "notmuch-hello-refresh hook is called" +counter=$(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=$(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