summaryrefslogtreecommitdiff
path: root/test/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp')
-rw-r--r--test/lisp/emacs-lisp/map-tests.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/map-tests.el b/test/lisp/emacs-lisp/map-tests.el
index 20cb0f6b39..0af1c656e0 100644
--- a/test/lisp/emacs-lisp/map-tests.el
+++ b/test/lisp/emacs-lisp/map-tests.el
@@ -192,6 +192,14 @@ Evaluate BODY for each created map.
(2 . b)
(3 . c))))))
+(ert-deftest test-map-do ()
+ (with-maps-do map
+ (let ((result nil))
+ (map-do (lambda (k v)
+ (add-to-list 'result (list (int-to-string k) v)))
+ map)
+ (should (equal result '(("2" 5) ("1" 4) ("0" 3)))))))
+
(ert-deftest test-map-keys-apply ()
(with-maps-do map
(should (equal (map-keys-apply (lambda (k) (int-to-string k))