[PATCH 1/2] test: add tests for hiding messages in notmuch-show view
Dmitry Kurochkin
dmitry.kurochkin at gmail.com
Thu May 26 14:38:34 PDT 2011
---
test/emacs | 16 ++++++++++++++++
.../notmuch-show-thread-with-hidden-messages | 3 +++
2 files changed, 19 insertions(+), 0 deletions(-)
create mode 100644 test/emacs.expected-output/notmuch-show-thread-with-hidden-messages
diff --git a/test/emacs b/test/emacs
index ccf02af..7421650 100755
--- a/test/emacs
+++ b/test/emacs
@@ -152,4 +152,20 @@ output=$(test_emacs "(notmuch-show \"$maildir_storage_thread\")
expected=$(cat $EXPECTED/notmuch-show-thread-maildir-storage)
test_expect_equal "$output" "$expected"
+test_begin_subtest "Hiding message in notmuch-show view"
+output=$(test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae at mail.gmail.com")
+ (notmuch-show-toggle-message)
+ (princ (visible-buffer-string))')
+expected=$(cat $EXPECTED/notmuch-show-thread-with-hidden-messages)
+test_expect_equal "$output" "$expected"
+
+test_begin_subtest "Hiding message with visible citation in notmuch-show view"
+output=$(test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae at mail.gmail.com")
+ (search-forward "Click/Enter to show.")
+ (button-activate (button-at (point)))
+ (notmuch-show-toggle-message)
+ (princ (visible-buffer-string))')
+expected=$(cat $EXPECTED/notmuch-show-thread-with-hidden-messages)
+test_expect_equal "$output" "$expected"
+
test_done
diff --git a/test/emacs.expected-output/notmuch-show-thread-with-hidden-messages b/test/emacs.expected-output/notmuch-show-thread-with-hidden-messages
new file mode 100644
index 0000000..5df6606
--- /dev/null
+++ b/test/emacs.expected-output/notmuch-show-thread-with-hidden-messages
@@ -0,0 +1,3 @@
+Jan Janak <jan at ryngle.com> (2009-11-17) (inbox unread)
+ Jan Janak <jan at ryngle.com> (2009-11-17) (inbox)
+ Carl Worth <cworth at cworth.org> (2009-11-18) (inbox unread)
--
1.7.5.1
More information about the notmuch
mailing list