aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2020-04-25 22:18:09 +0200
committerDavid Bremner <david@tethera.net>2020-05-26 20:23:14 -0300
commit291ef68eded5ff8f5f39b1aa17a83dd8e6abb342 (patch)
treeb62f27ec69f88586c726ef9fb7a1b8b7cfef4098 /test
parent6cdf4b7e38000c6d0a14ff04ab71f7c7e60835ec (diff)
emacs: Use `dolist' instead of `mapcar' for side-effects
As recommended by the byte-compiler.
Diffstat (limited to 'test')
-rw-r--r--test/emacs-attachment-warnings.el23
1 files changed, 11 insertions, 12 deletions
diff --git a/test/emacs-attachment-warnings.el b/test/emacs-attachment-warnings.el
index a23692d7..8f4918ef 100644
--- a/test/emacs-attachment-warnings.el
+++ b/test/emacs-attachment-warnings.el
@@ -67,16 +67,15 @@ Return `t' if the message would be sent, otherwise `nil'"
(defun notmuch-test-attachment-warning-1 ()
(let (output expected)
- (mapcar (lambda (test)
- (let* ((expect (car test))
- (body (cdr test))
- (result (attachment-check-test body)))
- (push expect expected)
- (push (if (eq result expect)
- result
- ;; In the case of a failure, include the test
- ;; details to make it simpler to debug.
- (format "%S <-- %S" result body))
- output)))
- attachment-check-tests)
+ (dolist (test attachment-check-tests)
+ (let* ((expect (car test))
+ (body (cdr test))
+ (result (attachment-check-test body)))
+ (push expect expected)
+ (push (if (eq result expect)
+ result
+ ;; In the case of a failure, include the test
+ ;; details to make it simpler to debug.
+ (format "%S <-- %S" result body))
+ output)))
(notmuch-test-expect-equal output expected)))