X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2FT630-emacs-draft.sh;h=d7903ce799da7ac846fce8c50f0c521f70650adc;hp=689ccfb83a721d2a1611d9ae1e5821a88b4f2521;hb=cd8006886b1c80ff556a96f1e84e3d3914067a54;hpb=90248f862b1860cc80c8afd06636311372e95fe4 diff --git a/test/T630-emacs-draft.sh b/test/T630-emacs-draft.sh index 689ccfb8..d7903ce7 100755 --- a/test/T630-emacs-draft.sh +++ b/test/T630-emacs-draft.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash test_description="Emacs Draft Handling" -. ./test-lib.sh || exit 1 +. $(dirname "$0")/test-lib.sh || exit 1 add_email_corpus @@ -32,7 +32,9 @@ test_begin_subtest "Saving a signed draft adds header" 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) @@ -52,4 +54,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 <EXPECTED +From: Notmuch Test Suite +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