]> git.cworth.org Git - notmuch/commitdiff
test: add two emacs tests for show mode refresh
authorJameson Graef Rollins <jrollins@finestructure.net>
Sun, 9 Oct 2011 03:21:26 +0000 (20:21 -0700)
committerDavid Bremner <bremner@debian.org>
Sun, 9 Oct 2011 11:26:08 +0000 (08:26 -0300)
The first test tests that the notmuch-show-refresh-view function
produces the exact same output for an unmodified show buffer.  This
test should pass since the relevant functionality has already been
applied.

The second test tests show refresh for a show buffer that has been
modified by navigation and message visibility toggling.  Ideally
refresh-view should preserve this state of the notmuch-show buffer.
Unfortunately it currently does not, so this test is know to be broken
and is marked as such.

test/emacs

index 8b627c7901050dc044ecb8c14b013de4732fbde9..0303d7d1d311ccfa68fc4952ad516675903af28f 100755 (executable)
@@ -368,4 +368,22 @@ test_emacs "(notmuch-show \"id:$id\") \
             (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