-test_begin_subtest 'Hiding message following HTML part'
-test_subtest_known_broken
-id='html-message@notmuchmail.org'
-emacs_deliver_message \
- 'HTML message' \
- '' \
- "(message-goto-eoh)
- (insert \"Message-ID: <$id>\n\")
- (message-goto-body)
- (mml-insert-part \"text/html\")
- (insert \"<body>This is a test HTML message</body>\")"
-emacs_deliver_message \
- 'Reply to HTML message' \
- 'This is a reply to the test HTML message' \
- "(message-goto-eoh)
- (insert \"In-Reply-To: <$id>\n\")"
-test_emacs "(notmuch-show \"id:$id\") \
- (notmuch-show-next-message) \
- (command-execute (key-binding (kbd \"RET\"))) \
- (test-visible-output)"
-test_emacs "(notmuch-show \"id:$id\") \
- (notmuch-show-next-message) \
- (notmuch-show-toggle-message) \
- (test-visible-output \"EXPECTED\")"
+test_begin_subtest "Stashing in notmuch-show"
+add_message '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' \
+ '[from]="Some One <someone@somewhere.org>"' \
+ '[to]="Some One Else <notsomeone@somewhere.org>"' \
+ '[cc]="Notmuch <notmuch@notmuchmail.org>"' \
+ '[subject]="Stash my stashables"' \
+ '[id]="bought"' \
+ '[body]="Unable to stash body. Where did you get it in the first place?!?"'
+notmuch tag +stashtest id:${gen_msg_id}
+test_emacs '(notmuch-show "id:\"bought\"")
+ (notmuch-show-stash-date)
+ (notmuch-show-stash-from)
+ (notmuch-show-stash-to)
+ (notmuch-show-stash-cc)
+ (notmuch-show-stash-subject)
+ (notmuch-show-stash-message-id)
+ (notmuch-show-stash-message-id-stripped)
+ (notmuch-show-stash-tags)
+ (notmuch-show-stash-filename)
+ (switch-to-buffer
+ (generate-new-buffer "*test-stashing*"))
+ (dotimes (i 9)
+ (yank)
+ (insert "\n")
+ (rotate-yank-pointer 1))
+ (reverse-region (point-min) (point-max))
+ (test-output)'
+cat <<EOF >EXPECTED
+Sat, 01 Jan 2000 12:00:00 -0000
+Some One <someone@somewhere.org>
+Some One Else <notsomeone@somewhere.org>
+Notmuch <notmuch@notmuchmail.org>
+Stash my stashables
+id:"bought"
+bought
+inbox,stashtest
+${gen_msg_filename}
+EOF