summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/map-tests.el
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>2020-02-06 18:30:47 -0500
committerRichard Stallman <rms@gnu.org>2020-02-06 18:30:47 -0500
commitc4be80112556e06bd7e92138e44051cc8c62e709 (patch)
tree2392fb385569e10ad9d4d0ab2a48a1771131bf4e /test/lisp/emacs-lisp/map-tests.el
parent53f0de5d7719b43f184ce1a910f14882aedc50bc (diff)
parent15814d0ccd95848a2a0513d93ab718a49b289598 (diff)
downloademacs-c4be80112556e06bd7e92138e44051cc8c62e709.tar.gz
emacs-c4be80112556e06bd7e92138e44051cc8c62e709.tar.bz2
emacs-c4be80112556e06bd7e92138e44051cc8c62e709.zip
Merge
Diffstat (limited to 'test/lisp/emacs-lisp/map-tests.el')
-rw-r--r--test/lisp/emacs-lisp/map-tests.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/lisp/emacs-lisp/map-tests.el b/test/lisp/emacs-lisp/map-tests.el
index 06fd55faad3..1888baf6017 100644
--- a/test/lisp/emacs-lisp/map-tests.el
+++ b/test/lisp/emacs-lisp/map-tests.el
@@ -227,7 +227,7 @@ Evaluate BODY for each created map.
(with-maps-do map
(let ((result nil))
(map-do (lambda (k v)
- (add-to-list 'result (list (int-to-string k) v)))
+ (push (list (int-to-string k) v) result))
map)
(should (equal result '(("2" 5) ("1" 4) ("0" 3)))))))
@@ -376,5 +376,11 @@ Evaluate BODY for each created map.
'((1 . 1) (2 . 5) (3 . 0)))
'((3 . 0) (2 . 9) (1 . 6)))))
+(ert-deftest test-map-plist-pcase ()
+ (let ((plist '(:one 1 :two 2)))
+ (should (equal (pcase-let (((map :one (:two two)) plist))
+ (list one two))
+ '(1 2)))))
+
(provide 'map-tests)
;;; map-tests.el ends here