]> git.cworth.org Git - notmuch/blobdiff - test/emacs
test: add broken test for `notmuch-hello-mode-hook' called during update
[notmuch] / test / emacs
index 6e922debc432017cae43338999bbecf7d8009a1e..b4c24448f795133bdc884bd30bd65168b21e6854 100755 (executable)
@@ -476,4 +476,24 @@ test_emacs "(let ((notmuch-command \"$notmuch_counter_command\"))
              (notmuch-show \"id:$id\"))"
 test_expect_equal $(notmuch_counter_value) 1
 
+test_begin_subtest "notmuch-hello-mode hook is called"
+counter=$(test_emacs \
+    '(let ((notmuch-hello-mode-hook-counter 0))
+       (kill-buffer "*notmuch-hello*")
+       (notmuch-hello)
+       notmuch-hello-mode-hook-counter)'
+)
+test_expect_equal "$counter" 1
+
+test_begin_subtest "notmuch-hello-mode hook is not called on updates"
+test_subtest_known_broken
+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_done