aboutsummaryrefslogtreecommitdiff
path: root/test/T630-emacs-draft.sh
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2016-11-13 14:08:50 +0000
committerDavid Bremner <david@tethera.net>2016-11-13 13:15:31 -0400
commit2dd96d6bd642c3b32ce1997528f69665019b7497 (patch)
treeffe973490f7823f359e834711b3381ca515288e0 /test/T630-emacs-draft.sh
parent90248f862b1860cc80c8afd06636311372e95fe4 (diff)
emacs: resume messages
Provide functionality to resume editing a message previously saved with notmuch-draft-save, including decoding the X-Notmuch-Emacs-Secure header. Resume gets the raw file from notmuch and using the emacs function mime-to-mml reconstructs the message (including attachments). 'e' is bound to resume a draft from show or tree mode.
Diffstat (limited to 'test/T630-emacs-draft.sh')
-rwxr-xr-xtest/T630-emacs-draft.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/T630-emacs-draft.sh b/test/T630-emacs-draft.sh
index 689ccfb8..46fc356f 100755
--- a/test/T630-emacs-draft.sh
+++ b/test/T630-emacs-draft.sh
@@ -52,4 +52,19 @@ count2=$(notmuch count subject:draft-test-0004)
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