test_emacs '(notmuch-mua-mail)
(message-goto-subject)
(insert "draft-test-0003")
- (mml-secure-message-sign)
+ ;; We would use (mml-secure-message-sign) but on emacs23
+ ;; that only signs the part, not the whole message.
+ (mml-secure-message mml-secure-method '\''sign)
(notmuch-draft-save)
(test-output)'
header_count=$(notmuch show --format=raw subject:draft-test-0003 | grep -c ^X-Notmuch-Emacs-Secure)
test_expect_equal "$count1,$count2" "3,0"
+test_begin_subtest "Resuming a signed draft"
+
+test_emacs '(notmuch-show "subject:draft-test-0003")
+ (notmuch-show-resume-message)
+ (test-output)'
+notmuch_dir_sanitize OUTPUT > OUTPUT.clean
+cat <<EOF | notmuch_dir_sanitize >EXPECTED
+From: Notmuch Test Suite <test_suite@notmuchmail.org>
+To:
+Subject: draft-test-0003
+Fcc: MAIL_DIR/sent
+--text follows this line--
+<#secure method=pgpmime mode=sign>
+EOF
+test_expect_equal_file EXPECTED OUTPUT.clean
test_done