mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 17:34:54 +01:00
test: add emacs test for hiding a message following an HTML part
Human-friendly scenario: * open a thread where a message which ends with an HTML part is followed by another message * make the first message visible * goto the beginning of the second message (first line, first colon) * hit "RET" Result: nothing happens except for "No URL at point" message Expected result: the second message is shown/hidden The root cause is that the HTML part has `keymap' text property set. In particular, "RET" is bound to visit a URL at point. The problem is that `keymap' property affects the next character following the region it is set to (see elisp manual [1]). Hence, the first character of the next message has a keymap inherited from the HTML part. [1] http://www.gnu.org/software/emacs/elisp/html_node/Special-Properties.html
This commit is contained in:
parent
4cc6727688
commit
c6a3a768fe
1 changed files with 26 additions and 0 deletions
26
test/emacs
26
test/emacs
|
@ -342,4 +342,30 @@ 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 \"<body>This is a test HTML message</body>\")"
|
||||
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_done
|
||||
|
|
Loading…
Reference in a new issue