]> git.notmuchmail.org Git - notmuch/commitdiff
test emacs: Add tests for hiding messages in notmuch-show view
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Thu, 26 May 2011 21:38:34 +0000 (01:38 +0400)
committerCarl Worth <cworth@cworth.org>
Wed, 15 Jun 2011 14:07:32 +0000 (07:07 -0700)
This test is expected to fail as it exposes a current bug, (which we
hope to fix soon).

test/emacs
test/emacs.expected-output/notmuch-show-thread-with-hidden-messages [new file with mode: 0644]

index f2e95980039773fb83e6ba4e2c867d9c117f5127..fa3426ed7ab7b7dcfbb7088309b0e8ece056f395 100755 (executable)
@@ -196,4 +196,20 @@ Thanks for the advice! I will be sure to put it to good use.
 [ 9-line hidden original message. Click/Enter to show. ]" > EXPECTED
 test_expect_equal_file OUTPUT EXPECTED
 
 [ 9-line hidden original message. Click/Enter to show. ]" > EXPECTED
 test_expect_equal_file OUTPUT EXPECTED
 
+test_begin_subtest "Hiding message in notmuch-show view"
+output=$(test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@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@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
 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 (file)
index 0000000..5df6606
--- /dev/null
@@ -0,0 +1,3 @@
+Jan Janak <jan@ryngle.com> (2009-11-17) (inbox unread)
+ Jan Janak <jan@ryngle.com> (2009-11-17) (inbox)
+ Carl Worth <cworth@cworth.org> (2009-11-18) (inbox unread)