diff options
| author | David Bremner <david@tethera.net> | 2016-11-13 14:08:49 +0000 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2016-11-13 13:15:31 -0400 |
| commit | 90248f862b1860cc80c8afd06636311372e95fe4 (patch) | |
| tree | da31d687ddeadc6a7ac782e1d00ae240247f764f /test | |
| parent | d820b97477f5705640aa8dcf9dcf311e37508def (diff) | |
emacs: check drafts for encryption tags before saving
In general the user may not want to save plaintext copies of messages
that they are sending encrypted, so give them a chance to abort.
Diffstat (limited to 'test')
| -rwxr-xr-x | test/T630-emacs-draft.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/T630-emacs-draft.sh b/test/T630-emacs-draft.sh index e39690ca..689ccfb8 100755 --- a/test/T630-emacs-draft.sh +++ b/test/T630-emacs-draft.sh @@ -39,4 +39,17 @@ header_count=$(notmuch show --format=raw subject:draft-test-0003 | grep -c ^X-No body_count=$(notmuch notmuch show --format=raw subject:draft-test-0003 | grep -c '^\<#secure') test_expect_equal "$header_count,$body_count" "1,0" +test_begin_subtest "Refusing to save an encrypted draft" +test_emacs '(notmuch-mua-mail) + (message-goto-subject) + (insert "draft-test-0004") + (mml-secure-message-sign-encrypt) + (let ((notmuch-draft-save-plaintext nil)) + (notmuch-draft-save)) + (test-output)' +count1=$(notmuch count tag:draft) +count2=$(notmuch count subject:draft-test-0004) + +test_expect_equal "$count1,$count2" "3,0" + test_done |
