mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-23 19:38:07 +01:00
emacs: Use dolist' instead of
mapcar' for side-effects
As recommended by the byte-compiler.
This commit is contained in:
parent
6cdf4b7e38
commit
291ef68ede
1 changed files with 11 additions and 12 deletions
|
@ -67,16 +67,15 @@ Return `t' if the message would be sent, otherwise `nil'"
|
||||||
|
|
||||||
(defun notmuch-test-attachment-warning-1 ()
|
(defun notmuch-test-attachment-warning-1 ()
|
||||||
(let (output expected)
|
(let (output expected)
|
||||||
(mapcar (lambda (test)
|
(dolist (test attachment-check-tests)
|
||||||
(let* ((expect (car test))
|
(let* ((expect (car test))
|
||||||
(body (cdr test))
|
(body (cdr test))
|
||||||
(result (attachment-check-test body)))
|
(result (attachment-check-test body)))
|
||||||
(push expect expected)
|
(push expect expected)
|
||||||
(push (if (eq result expect)
|
(push (if (eq result expect)
|
||||||
result
|
result
|
||||||
;; In the case of a failure, include the test
|
;; In the case of a failure, include the test
|
||||||
;; details to make it simpler to debug.
|
;; details to make it simpler to debug.
|
||||||
(format "%S <-- %S" result body))
|
(format "%S <-- %S" result body))
|
||||||
output)))
|
output)))
|
||||||
attachment-check-tests)
|
|
||||||
(notmuch-test-expect-equal output expected)))
|
(notmuch-test-expect-equal output expected)))
|
||||||
|
|
Loading…
Reference in a new issue