diff options
author | Nicolas Petton <nicolas@petton.fr> | 2016-12-15 10:24:57 +0100 |
---|---|---|
committer | Nicolas Petton <nicolas@petton.fr> | 2016-12-15 10:26:11 +0100 |
commit | 09a66ceb5e906e704be58d5f40c45096307f0b9e (patch) | |
tree | 38c6d80e6ff84430cf16511ba8e7edb40cb0e4cc /test/lisp/emacs-lisp | |
parent | acbe32abddd9740acd756419f068cb4bc345567c (diff) | |
download | emacs-09a66ceb5e906e704be58d5f40c45096307f0b9e.tar.gz emacs-09a66ceb5e906e704be58d5f40c45096307f0b9e.tar.bz2 emacs-09a66ceb5e906e704be58d5f40c45096307f0b9e.zip |
Fix circular list handling in seq-mapn
* lisp/emacs-lisp/seq.el (seq-mapn): Do not copy list arguments.
* test/lisp/emacs-lisp/seq-tests.el (test-seq-mapn-circular-lists):
Add a regression test.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r-- | test/lisp/emacs-lisp/seq-tests.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/seq-tests.el b/test/lisp/emacs-lisp/seq-tests.el index 2e533acce17..fc65c9834d6 100644 --- a/test/lisp/emacs-lisp/seq-tests.el +++ b/test/lisp/emacs-lisp/seq-tests.el @@ -386,5 +386,10 @@ Evaluate BODY for each created sequence. (should-error (seq-random-elt [])) (should-error (seq-random-elt ""))) +(ert-deftest test-seq-mapn-circular-lists () + (let ((l1 '#1=(1 . #1#))) + (should (equal (seq-mapn #'+ '(3 4 5 7) l1) + '(4 5 6 8))))) + (provide 'seq-tests) ;;; seq-tests.el ends here |