aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNicolas Petton2015-05-05 21:45:36 +0200
committerNicolas Petton2015-05-05 21:45:36 +0200
commit6cd74155985f6335e26ffa419c38d0d2f91e3b4e (patch)
tree7e85d09789d5c8f57c6234eac99afa14d3fb3379 /test
parentb096be2aa8f2eeaef12cb4e19994f40ab85a342c (diff)
downloademacs-6cd74155985f6335e26ffa419c38d0d2f91e3b4e.tar.gz
emacs-6cd74155985f6335e26ffa419c38d0d2f91e3b4e.zip
Add support for &rest in `seq-let'
* lisp/emacs-lisp/seq.el (seq--make-bindings): Add support for `&rest' in the argument list. * test/automated/seq-tests.el: Add a test for parsing and binding `&rest' in `seq-let'.
Diffstat (limited to 'test')
-rw-r--r--test/automated/seq-tests.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/automated/seq-tests.el b/test/automated/seq-tests.el
index e1e8ae002d0..ab46eb85f76 100644
--- a/test/automated/seq-tests.el
+++ b/test/automated/seq-tests.el
@@ -283,7 +283,11 @@ Evaluate BODY for each created sequence.
283 (should (= b 2)) 283 (should (= b 2))
284 (should (= c 3)) 284 (should (= c 3))
285 (should (= d 4)) 285 (should (= d 4))
286 (should (null e)))) 286 (should (null e)))
287 (seq-let (a b &rest others) seq
288 (should (= a 1))
289 (should (= b 2))
290 (should (same-contents-p others (seq-drop seq 2)))))
287 (let ((seq '(1 (2 (3 (4)))))) 291 (let ((seq '(1 (2 (3 (4))))))
288 (seq-let (_ (_ (_ (a)))) seq 292 (seq-let (_ (_ (_ (a)))) seq
289 (should (= a 4)))) 293 (should (= a 4))))