summaryrefslogtreecommitdiff
path: root/test/lisp/gnus
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-10-04 19:45:05 +0200
committerAndrea Corallo <akrl@sdf.org>2020-10-04 19:45:05 +0200
commit44ef24342fd8a2ac876212124ebf38673acda35a (patch)
tree793dc4ba4197559b4bc65339d713c0807a7b2ca9 /test/lisp/gnus
parentafb765ab3cab7b6582d0def543b23603cd076445 (diff)
parentd8665e6d3473403c90a0831e83439a013d0012d3 (diff)
downloademacs-44ef24342fd8a2ac876212124ebf38673acda35a.tar.gz
emacs-44ef24342fd8a2ac876212124ebf38673acda35a.tar.bz2
emacs-44ef24342fd8a2ac876212124ebf38673acda35a.zip
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'test/lisp/gnus')
-rw-r--r--test/lisp/gnus/gnus-util-tests.el13
-rw-r--r--test/lisp/gnus/mml-sec-tests.el32
2 files changed, 8 insertions, 37 deletions
diff --git a/test/lisp/gnus/gnus-util-tests.el b/test/lisp/gnus/gnus-util-tests.el
index ec58032e84e..47f0a9cf761 100644
--- a/test/lisp/gnus/gnus-util-tests.el
+++ b/test/lisp/gnus/gnus-util-tests.el
@@ -151,8 +151,10 @@
(should (equal "Zg==" (gnus-base64-repad "Zg")))
(should (equal "Zg==" (gnus-base64-repad "Zg====")))
- (should (equal (gnus-base64-repad " ") ""))
- (should (equal (gnus-base64-repad "Zg== ") "Zg=="))
+ (should-error (gnus-base64-repad " ")
+ :type 'error)
+ (should-error (gnus-base64-repad "Zg== ")
+ :type 'error)
(should-error (gnus-base64-repad "Z?\x00g==")
:type 'error)
;; line-length
@@ -162,9 +164,10 @@
(should-error (gnus-base64-repad "Zm9v\r\nYmFy" t)
:type 'error)
(should (equal "Zm9vYmFy" (gnus-base64-repad "Zm9vYmFy" t)))
- (should (equal "Zm9vYmFy" (gnus-base64-repad "Zm9v\r\nYmFy" nil)))
- (should (equal "Zm9vYmFy" (gnus-base64-repad "Zm9v\r\nYmFy\n" nil)))
- (should (equal (gnus-base64-repad "Zm9v\r\n YmFy\r\n" nil) "Zm9vYmFy"))
+ (should (equal "Zm9vYmFy" (gnus-base64-repad "Zm9v\r\nYmFy")))
+ (should (equal "Zm9vYmFy" (gnus-base64-repad "Zm9v\r\nYmFy\n")))
+ (should (equal "Zm9vYmFy" (gnus-base64-repad "Zm9v\r\n YmFy\r\n")))
+ (should (equal "Zm9vYmFy" (gnus-base64-repad "Zm9v \r\n\tYmFy")))
(should-error (gnus-base64-repad "Zm9v\r\nYmFy" nil 3)
:type 'error))
diff --git a/test/lisp/gnus/mml-sec-tests.el b/test/lisp/gnus/mml-sec-tests.el
index 4c745ea6d73..427018520c8 100644
--- a/test/lisp/gnus/mml-sec-tests.el
+++ b/test/lisp/gnus/mml-sec-tests.el
@@ -67,7 +67,6 @@ instead of gpg-agent."
(condition-case error
(let ((epg-gpg-home-directory
(expand-file-name "test/data/mml-sec" source-directory))
- (mml-secure-allow-signing-with-unknown-recipient t)
(mml-smime-use 'epg)
;; Create debug output in empty epg-debug-buffer.
(epg-debug t)
@@ -762,37 +761,6 @@ Use sign-with-sender and encrypt-to-self."
method "no-exp@example.org" "sub@example.org" 2 nil))
)))))
-(ert-deftest mml-secure-sign-verify-2 ()
- "Sign message without sender; then verify and test for expected result."
- (skip-unless (test-conf))
- (mml-secure-test-key-fixture
- (lambda ()
- (dolist (method (sign-standards) nil)
- (let ((mml-secure-openpgp-sign-with-sender nil)
- (mml-secure-smime-sign-with-sender nil))
- ;; A single signing key for sender sub@example.org is customized
- ;; in the fixture, but not used here.
- ;; By default, gpg uses the first secret key in the keyring, which
- ;; is 02372A42CA6D40FB (OpenPGP) or
- ;; 0E58229B80EE33959FF718FEEF25402B479DC6E2 (S/MIME) here.
- (mml-secure-test-en-decrypt
- method "uid1@example.org" "sub@example.org" 0 nil)
-
- ;; From sub@example.org, sign with specified key:
- (let ((mml-secure-openpgp-signers '("02372A42CA6D40FB"))
- (mml-secure-smime-signers
- '("D06AA118653CC38E9D0CAF56ED7A2135E1582177")))
- (mml-secure-test-en-decrypt
- method "no-exp@example.org" "sub@example.org" 1 nil))
-
- ;; From sub@example.org, sign with different specified key:
- (let ((mml-secure-openpgp-signers '("C3999CF1268DBEA2"))
- (mml-secure-smime-signers
- '("0E58229B80EE33959FF718FEEF25402B479DC6E2")))
- (mml-secure-test-en-decrypt
- method "no-exp@example.org" "sub@example.org" 1 nil))
- )))))
-
(ert-deftest mml-secure-sign-verify-3 ()
"Try to sign message with expired OpenPGP subkey, which raises an error.
With Ma Gnus v0.14 and earlier a signature would be created with a wrong key."