[PATCH 1/2] test: add emacs test for hiding message when point is at invisible text

Subject: [PATCH 1/2] test: add emacs test for hiding message when point is at invisible text

Date: Sun, 3 Jul 2011 08:28:05 +0400

To: notmuch@notmuchmail.org

Cc:

From: Dmitry Kurochkin


Human-friendly scenario:

* open a thread which has at least 2 messages in notmuch-show view
* hide the first message
* move to the first line of the second message
* press C-a (bound to `beginning-of-visual-line')
* press RET (bound to `notmuch-show-toggle-message')

Result: the first message is shown
Expected result: the second message is hidden or shown

Currently the test is failing.  The bug will be fixed by a subsequent
patch.
---
 test/emacs |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/test/emacs b/test/emacs
index 53f455a..173d371 100755
--- a/test/emacs
+++ b/test/emacs
@@ -347,4 +347,15 @@ 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 when point is at invisible text'
+test_emacs '(notmuch-show "id:1258471718-6781-2-git-send-email-dottedmag@dottedmag.net")
+	    (notmuch-show-toggle-message)
+	    (test-visible-output "EXPECTED")
+	    (notmuch-show-toggle-message)
+	    (goto-char (previous-single-char-property-change
+			(point) '\''invisible))
+	    (notmuch-show-toggle-message)
+	    (test-visible-output)'
+test_expect_equal_file OUTPUT EXPECTED
+
 test_done
-- 
1.7.5.4


Thread: