X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2Femacs;h=0303d7d1d311ccfa68fc4952ad516675903af28f;hb=7a87830f5eb32373bc17235e9d178d383830dc64;hp=53f455a34b641dbd8e51610dffbb365e0602a631;hpb=ec1b568929f53b99362d6b254085da03231a2a26;p=notmuch diff --git a/test/emacs b/test/emacs index 53f455a3..0303d7d1 100755 --- a/test/emacs +++ b/test/emacs @@ -1,10 +1,5 @@ #!/usr/bin/env bash -# Note: do not use `setq' for setting variables in Emacs tests because -# it affects other tests that may run in the same Emacs instance. Use -# `let' instead so the scope of the changed variables is limited to a -# single test. - test_description="emacs interface" . test-lib.sh @@ -347,4 +342,48 @@ test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail. (test-visible-output)' test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages +test_begin_subtest 'Hiding message following HTML part' +test_subtest_known_broken +id='html-message@notmuchmail.org' +emacs_deliver_message \ + 'HTML message' \ + '' \ + "(message-goto-eoh) + (insert \"Message-ID: <$id>\n\") + (message-goto-body) + (mml-insert-part \"text/html\") + (insert \"This is a test HTML message\")" +emacs_deliver_message \ + 'Reply to HTML message' \ + 'This is a reply to the test HTML message' \ + "(message-goto-eoh) + (insert \"In-Reply-To: <$id>\n\")" +test_emacs "(notmuch-show \"id:$id\") \ + (notmuch-show-next-message) \ + (command-execute (key-binding (kbd \"RET\"))) \ + (test-visible-output)" +test_emacs "(notmuch-show \"id:$id\") \ + (notmuch-show-next-message) \ + (notmuch-show-toggle-message) \ + (test-visible-output \"EXPECTED\")" +test_expect_equal_file OUTPUT EXPECTED + +test_begin_subtest "Refresh show buffer" +test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com") + (test-visible-output "EXPECTED") + (notmuch-show-refresh-view) + (test-visible-output)' +test_expect_equal_file OUTPUT EXPECTED + +test_begin_subtest "Refresh modified show buffer" +test_subtest_known_broken +test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com") + (notmuch-show-toggle-message) + (notmuch-show-next-message) + (notmuch-show-toggle-message) + (test-visible-output "EXPECTED") + (notmuch-show-refresh-view) + (test-visible-output)' +test_expect_equal_file OUTPUT EXPECTED + test_done