aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2019-04-22 13:18:13 -0400
committerDavid Bremner <david@tethera.net>2019-05-10 12:30:03 -0300
commit9c0001de4bf3446a7cb8e6afc8dd3288be9169b7 (patch)
tree466674081a2d1d7156ef005b2e5ce85c357b74ac /test
parente19954fa188e8a2a9bb4d57a235eb11490880fb9 (diff)
test: show what emacs sees of an encrypted message when crypto is disabled
Some users may set notmuch-crypto-process-mime to nil, disabling all crypto use. We should have a baseline for what that looks like.
Diffstat (limited to 'test')
-rwxr-xr-xtest/T450-emacs-show.sh6
-rw-r--r--test/emacs-show.expected-output/notmuch-show-decrypted-message-no-crypto10
2 files changed, 16 insertions, 0 deletions
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-encrypted@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-encrypted@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_suite@notmuchmail.org (2000-01-01) (encrypted inbox)
+Subject: Here is the password
+To: test_suite@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 ]