diff options
author | Adam Porter <adam@alphapapa.net> | 2020-02-02 10:17:20 -0600 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2020-02-04 12:30:31 -0500 |
commit | e287da5a8154d83a97107b64915ccc17e3a086b8 (patch) | |
tree | 37f52e272e0d697165a3ffea60b15ade79d8a65e /test/lisp/emacs-lisp | |
parent | b641c178ce3d022a9fca1d44ecb60f3878a989bd (diff) | |
download | emacs-e287da5a8154d83a97107b64915ccc17e3a086b8.tar.gz emacs-e287da5a8154d83a97107b64915ccc17e3a086b8.tar.bz2 emacs-e287da5a8154d83a97107b64915ccc17e3a086b8.zip |
* lisp/emacs-lisp/map.el: Add keyword-only pattern abbreviation
* lisp/emacs-lisp/map.el: Update version to 2.1.
((pcase-defmacro map)): Update docstring.
(map--make-pcase-bindings): Match keyword pattern.
* test/lisp/emacs-lisp/map-tests.el (test-map-plist-pcase): Add test.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r-- | test/lisp/emacs-lisp/map-tests.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/map-tests.el b/test/lisp/emacs-lisp/map-tests.el index 06fd55faad3..3ffef177711 100644 --- a/test/lisp/emacs-lisp/map-tests.el +++ b/test/lisp/emacs-lisp/map-tests.el @@ -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 |