diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/emacs-lisp/map-tests.el | 8 |
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 20cb0f6b399..0af1c656e09 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. | |||
| 192 | (2 . b) | 192 | (2 . b) |
| 193 | (3 . c)))))) | 193 | (3 . c)))))) |
| 194 | 194 | ||
| 195 | (ert-deftest test-map-do () | ||
| 196 | (with-maps-do map | ||
| 197 | (let ((result nil)) | ||
| 198 | (map-do (lambda (k v) | ||
| 199 | (add-to-list 'result (list (int-to-string k) v))) | ||
| 200 | map) | ||
| 201 | (should (equal result '(("2" 5) ("1" 4) ("0" 3))))))) | ||
| 202 | |||
| 195 | (ert-deftest test-map-keys-apply () | 203 | (ert-deftest test-map-keys-apply () |
| 196 | (with-maps-do map | 204 | (with-maps-do map |
| 197 | (should (equal (map-keys-apply (lambda (k) (int-to-string k)) | 205 | (should (equal (map-keys-apply (lambda (k) (int-to-string k)) |