]> git.notmuchmail.org Git - notmuch/blobdiff - test/T450-emacs-show.sh
emacs/show: introduce notmuch-show-height-limit
[notmuch] / test / T450-emacs-show.sh
index e9c59cd3aeb6c3fc2aedd0abdf7182e84255d978..64f174cf63d709576234f41c639828ea964c5c7b 100755 (executable)
@@ -100,6 +100,26 @@ test_emacs '(let ((notmuch-show-depth-limit -1))
        (test-visible-output))'
 test_expect_equal_file $EXPECTED/notmuch-show-depth OUTPUT
 
+
+test_begin_subtest "Hide bodies of messages by height"
+test_emacs '(let ((notmuch-show-height-limit -1))
+       (notmuch-search "thread:{id:87ocn0qh6d.fsf@yoom.home.cworth.org}")
+       (notmuch-test-wait)
+       (notmuch-search-show-thread)
+       (notmuch-test-wait)
+       (test-visible-output))'
+# folding all messages by height or depth should look the same
+test_expect_equal_file $EXPECTED/notmuch-show-depth OUTPUT
+
+test_begin_subtest "Hide bodies of messages; show only leaves."
+test_emacs '(let ((notmuch-show-height-limit 0))
+       (notmuch-search "thread:{id:87ocn0qh6d.fsf@yoom.home.cworth.org}")
+       (notmuch-test-wait)
+       (notmuch-search-show-thread)
+       (notmuch-test-wait)
+       (test-visible-output))'
+test_expect_equal_file $EXPECTED/notmuch-show-height-0 OUTPUT
+
 test_begin_subtest "Hide bodies of messages (depth > 1)"
 test_emacs '(let ((notmuch-show-depth-limit 1))
        (notmuch-search "thread:{id:87ocn0qh6d.fsf@yoom.home.cworth.org}")