diff options
author | Alex Bochannek <alex@bochannek.com> | 2020-10-01 02:44:58 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-10-01 02:44:58 +0200 |
commit | d11627a7cadfe7db9415269135a8f4bec543ccd7 (patch) | |
tree | ba0b1c3302c0374e00f7305313bc8a2ed610aa1f /test/lisp/gnus | |
parent | 75185968578cbbd806274d9dfd984aff7a1b02c9 (diff) | |
download | emacs-d11627a7cadfe7db9415269135a8f4bec543ccd7.tar.gz emacs-d11627a7cadfe7db9415269135a8f4bec543ccd7.tar.bz2 emacs-d11627a7cadfe7db9415269135a8f4bec543ccd7.zip |
Make gnus-base64-repad a bit stricter again
* lisp/gnus/gnus-util.el (gnus-base64-repad): Make the code a bit
stricter again.
Diffstat (limited to 'test/lisp/gnus')
-rw-r--r-- | test/lisp/gnus/gnus-util-tests.el | 13 |
1 files changed, 8 insertions, 5 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)) |