summaryrefslogtreecommitdiff
path: root/test/automated/seq-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/automated/seq-tests.el')
-rw-r--r--test/automated/seq-tests.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/automated/seq-tests.el b/test/automated/seq-tests.el
index 7f6e06cc4b6..e1e8ae002d0 100644
--- a/test/automated/seq-tests.el
+++ b/test/automated/seq-tests.el
@@ -276,5 +276,22 @@ Evaluate BODY for each created sequence.
(v2 [2 4 6]))
(should (seq-empty-p (seq-difference v1 v2)))))
+(ert-deftest test-seq-let ()
+ (with-test-sequences (seq '(1 2 3 4))
+ (seq-let (a b c d e) seq
+ (should (= a 1))
+ (should (= b 2))
+ (should (= c 3))
+ (should (= d 4))
+ (should (null e))))
+ (let ((seq '(1 (2 (3 (4))))))
+ (seq-let (_ (_ (_ (a)))) seq
+ (should (= a 4))))
+ (let (seq)
+ (seq-let (a b c) seq
+ (should (null a))
+ (should (null b))
+ (should (null c)))))
+
(provide 'seq-tests)
;;; seq-tests.el ends here