(notmuch-test-wait)
(test-output)
(delete-other-windows)'
-test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox OUTPUT
+test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox-oldest-first OUTPUT
test_begin_subtest "Tree view of a single thread (from search)"
test_emacs '(notmuch-hello)
(notmuch-tree "*")))'
test_expect_equal "$(cat MESSAGES)" "COMPLETE"
+# reinitialize database for outline tests
+add_email_corpus
+
+test_begin_subtest "start in outline mode"
+test_emacs '(let ((notmuch-tree-outline-enabled t))
+ (notmuch-tree "tag:inbox")
+ (notmuch-test-wait)
+ (test-visible-output))'
+# folding all messages by height or depth should look the same
+test_expect_equal_file $EXPECTED/inbox-outline OUTPUT
+
+test_begin_subtest "outline-cycle-buffer"
+test_emacs '(let ((notmuch-tree-outline-enabled t))
+ (notmuch-tree "tag:inbox")
+ (notmuch-test-wait)
+ (outline-cycle-buffer)
+ (outline-cycle-buffer)
+ (notmuch-test-wait)
+ (test-visible-output))'
+# folding all messages by height or depth should look the same
+test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox OUTPUT
+
+test_begin_subtest "notmuch-tree for message with subject with embedded CRNL"
+add_message "[subject]=\"=?UTF-8?B?8J+Pi++4jw==?= A SALE to boost your =?UTF-8?Q?workout=0D=0A?=\" [body]=the-message-body"
+test_emacs "(notmuch-tree \"id:${gen_msg_id}\")
+ (notmuch-test-wait)
+ (test-output)"
+# one line of output, plus "End of search results."
+test_expect_equal "$(wc -l < OUTPUT)" 2
+
add_email_corpus duplicate
ID3=87r2ecrr6x.fsf@zephyr.silentflame.com