Some users may set notmuch-crypto-process-mime to nil, disabling all
crypto use.  We should have a baseline for what that looks like.
---
 test/T450-emacs-show.sh                                |  6 ++++++
 .../notmuch-show-decrypted-message-no-crypto           | 10 ++++++++++
 2 files changed, 16 insertions(+)
 create mode 100644 
test/emacs-show.expected-output/notmuch-show-decrypted-message-no-crypto

diff --git a/test/T450-emacs-show.sh b/test/T450-emacs-show.sh
index 5d4df443..de1755d2 100755
--- a/test/T450-emacs-show.sh
+++ b/test/T450-emacs-show.sh
@@ -223,4 +223,10 @@ test_emacs '(notmuch-show 
"id:simple-encryp...@crypto.notmuchmail.org")
             (test-visible-output)'
 test_expect_equal_file $EXPECTED/notmuch-show-undecryptable-message OUTPUT
 
+test_begin_subtest "show encrypted message when not processing crypto"
+test_emacs '(let ((notmuch-crypto-process-mime nil))
+             (notmuch-show "id:basic-encryp...@crypto.notmuchmail.org")
+             (test-visible-output))'
+test_expect_equal_file $EXPECTED/notmuch-show-decrypted-message-no-crypto 
OUTPUT
+
 test_done
diff --git 
a/test/emacs-show.expected-output/notmuch-show-decrypted-message-no-crypto 
b/test/emacs-show.expected-output/notmuch-show-decrypted-message-no-crypto
new file mode 100644
index 00000000..e302e452
--- /dev/null
+++ b/test/emacs-show.expected-output/notmuch-show-decrypted-message-no-crypto
@@ -0,0 +1,10 @@
+test_su...@notmuchmail.org (2000-01-01) (encrypted inbox)
+Subject: Here is the password
+To: test_su...@notmuchmail.org
+Date: Sat, 01 Jan 2000 12:00:00 +0000
+
+[ multipart/encrypted ]
+[ Unknown encryption status ]
+[ Unknown signature status ]
+[ application/pgp-encrypted ]
+[ application/octet-stream ]
-- 
2.20.1

_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to