]> git.notmuchmail.org Git - notmuch/blobdiff - test/emacs
Merge branch 'release'
[notmuch] / test / emacs
index dffad0fc171a2fc93d1b1ffc58abe403a1cfe768..ac47b161f837be4f325101c8305ab499867e376f 100755 (executable)
@@ -52,21 +52,21 @@ test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
 
 test_begin_subtest "Basic notmuch-show view in emacs default indentation"
 maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
-test_emacs "(let ((notmuch-indent-messages-width 1))
+test_emacs "(let ((notmuch-show-indent-messages-width 1))
              (notmuch-show \"$maildir_storage_thread\")
              (test-output))"
 test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
 
 test_begin_subtest "Basic notmuch-show view in emacs without indentation"
 maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
-test_emacs "(let ((notmuch-indent-messages-width 0))
+test_emacs "(let ((notmuch-show-indent-messages-width 0))
              (notmuch-show \"$maildir_storage_thread\")
              (test-output))"
 test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage-without-indentation
 
 test_begin_subtest "Basic notmuch-show view in emacs with fourfold indentation"
 maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
-test_emacs "(let ((notmuch-indent-messages-width 4))
+test_emacs "(let ((notmuch-show-indent-messages-width 4))
              (notmuch-show \"$maildir_storage_thread\")
              (test-output))"
 test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage-with-fourfold-indentation
@@ -81,7 +81,7 @@ cat <<EOF >EXPECTED
 "Invalid " From" <test_suite@notmuchmail.org> (2001-01-05) (inbox)
 Subject: message-with-invalid-from
 To: Notmuch Test Suite <test_suite@notmuchmail.org>
-Date: Tue, 05 Jan 2001 15:43:57 -0000
+Date: Fri, 05 Jan 2001 15:43:57 +0000
 
 This is just a test message (#1)
 EOF
@@ -320,7 +320,7 @@ add_message '[from]="Top Poster <top@poster.com>"' \
 ----- Original Message -----
 From: Notmuch Test Suite <test_suite@notmuchmail.org>
 To: Notmuch Test Suite <test_suite@notmuchmai.org>
-Sent: Tue, 05 Jan 2001 15:43:57 -0000
+Sent: Fri, 05 Jan 2001 15:43:57 +0000
 Subject: The problem with top-posting
 
 Q: Why is top-posting such a bad thing?
@@ -331,7 +331,7 @@ test_emacs "(notmuch-show \"top-posting\")
 echo "Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
 Subject: The problem with top-posting
 To: Notmuch Test Suite <test_suite@notmuchmail.org>
-Date: Tue, 05 Jan 2001 15:43:57 -0000
+Date: Fri, 05 Jan 2001 15:43:57 +0000
 
 A: Because it messes up the order in which people normally read text.
 Q: Why is top-posting such a bad thing?
@@ -340,7 +340,7 @@ Q: What is the most annoying thing in e-mail?
 Top Poster <top@poster.com> (2001-01-05) (inbox unread)
 Subject: Re: The problem with top-posting
 To: Notmuch Test Suite <test_suite@notmuchmail.org>
-Date: Tue, 05 Jan 2001 15:43:57 -0000
+Date: Fri, 05 Jan 2001 15:43:57 +0000
 
 Thanks for the advice! I will be sure to put it to good use.
 
@@ -495,4 +495,23 @@ counter=$(test_emacs \
 )
 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