From 9c0001de4bf3446a7cb8e6afc8dd3288be9169b7 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Mon, 22 Apr 2019 13:18:13 -0400 Subject: [PATCH] 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. --- 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-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 ]