]> git.cworth.org Git - notmuch/commitdiff
test: show what emacs sees of an encrypted message when crypto is disabled
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 22 Apr 2019 17:18:13 +0000 (13:18 -0400)
committerDavid Bremner <david@tethera.net>
Fri, 10 May 2019 15:30:03 +0000 (12:30 -0300)
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
test/emacs-show.expected-output/notmuch-show-decrypted-message-no-crypto [new file with mode: 0644]

index 5d4df44367c2208ec6ba0b349cd4c153ff91f76f..de1755d2da890d6891db54cdff0e35bd7e986f58 100755 (executable)
@@ -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 (file)
index 0000000..e302e45
--- /dev/null
@@ -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 ]