[PATCH 1/2] test/crypto: test reply to encrypted message in emacs
David Bremner
david at tethera.net
Mon Sep 12 18:45:57 PDT 2016
This is the current button ridden format, to be cleaned up in a
subsequent commit.
---
test/T350-crypto.sh | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/test/T350-crypto.sh b/test/T350-crypto.sh
index 96349fa..28ea9ad 100755
--- a/test/T350-crypto.sh
+++ b/test/T350-crypto.sh
@@ -316,6 +316,28 @@ test_expect_equal \
"$output" \
"$expected"
+test_begin_subtest "Reply within emacs to an encrypted message"
+test_emacs "(let ((message-hidden-headers '())
+ (notmuch-crypto-process-mime 't))
+ (notmuch-show \"subject:test.encrypted.message.002\")
+ (notmuch-show-reply)
+ (test-output))"
+# the empty To: is probably a bug, but it's not to do with encryption
+grep -v -e '^In-Reply-To:' -e '^References:' -e '^Fcc:' -e 'To:' < OUTPUT > OUTPUT.clean
+cat <<EOF >EXPECTED
+From: Notmuch Test Suite <test_suite at notmuchmail.org>
+Subject: Re: test encrypted message 002
+--text follows this line--
+<#secure method=pgpmime mode=signencrypt>
+Notmuch Test Suite <test_suite at notmuchmail.org> writes:
+
+> [ Decryption successful ]
+> [ Good signature by: Notmuch Test Suite <test_suite at notmuchmail.org> (INSECURE!) ]
+> Version: 1
+> This is another test encrypted message.
+EOF
+test_expect_equal_file EXPECTED OUTPUT.clean
+
test_begin_subtest "signature verification with revoked key"
# generate revocation certificate and load it to revoke key
echo "y
--
2.9.3
More information about the notmuch
mailing list