]> git.cworth.org Git - notmuch/blobdiff - test/T450-emacs-show.sh
emacs/show: obey notmuch-show-max-text-part-size for part 0
[notmuch] / test / T450-emacs-show.sh
index 0749dc9dda4621ec7bdeed562701210b869e978e..e9c59cd3aeb6c3fc2aedd0abdf7182e84255d978 100755 (executable)
@@ -109,6 +109,24 @@ test_emacs '(let ((notmuch-show-depth-limit 1))
        (test-visible-output))'
 test_expect_equal_file $EXPECTED/notmuch-show-depth-1 OUTPUT
 
+test_begin_subtest "Hide bodies of messages by size"
+test_emacs '(let ((notmuch-show-max-text-part-size 1))
+       (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-size OUTPUT
+
+test_begin_subtest "Hide bodies of messages by size > 450"
+test_emacs '(let ((notmuch-show-max-text-part-size 450))
+       (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-size-450 OUTPUT
+
 test_begin_subtest "notmuch-show: elide non-matching messages (w/ notmuch-show-toggle-elide-non-matching)"
 test_emacs '(let ((notmuch-show-only-matching-messages nil))
        (notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"")