summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/let-alist-tests.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-07-28 23:28:18 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-07-28 23:28:24 +0200
commitd7665ae8df47b24d297ed131eb42ebed446423a0 (patch)
tree0c8a9fbfdb2f2f0f5fc5e8b778c83b4e98013c38 /test/lisp/emacs-lisp/let-alist-tests.el
parent776872766cd3af5ef68785236dcc05b378e8f267 (diff)
downloademacs-d7665ae8df47b24d297ed131eb42ebed446423a0.tar.gz
Make let-alist work with vectors
* lisp/emacs-lisp/let-alist.el (let-alist--deep-dot-search): Descend into vectors, too, looking for dotted variables (bug#23244). Test case: (let-alist '((a . 1) (b . 2)) `[,(+ .a) ,(+ .a .b .b)])
Diffstat (limited to 'test/lisp/emacs-lisp/let-alist-tests.el')
-rw-r--r--test/lisp/emacs-lisp/let-alist-tests.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/let-alist-tests.el b/test/lisp/emacs-lisp/let-alist-tests.el
index 31db4a91dcc..9c3f2a5928f 100644
--- a/test/lisp/emacs-lisp/let-alist-tests.el
+++ b/test/lisp/emacs-lisp/let-alist-tests.el
@@ -95,4 +95,9 @@ See Bug#24641."
(should (equal (let-alist--deep-dot-search '(foo .bar (let-alist .qux .baz)))
'((.bar . bar) (.qux . qux))))) ; no .baz
+(ert-deftest let-alist--vectors ()
+ (should (equal (let-alist '((a . 1) (b . 2))
+ `[,(+ .a) ,(+ .a .b .b)])
+ [1 5])))
+
;;; let-alist.el ends here