diff options
| author | Nicolas Petton | 2015-02-06 15:52:23 +0100 |
|---|---|---|
| committer | Nicolas Petton | 2015-02-06 15:52:23 +0100 |
| commit | 05211a578ed2c52f6ed818fc173561afbaea54c2 (patch) | |
| tree | 6070ecbed3f1c61b5d48886f06848308f8302ece /test | |
| parent | 5c9ad35f1e5fd8ee5561ef48baac1f6ff20ae679 (diff) | |
| download | emacs-05211a578ed2c52f6ed818fc173561afbaea54c2.tar.gz emacs-05211a578ed2c52f6ed818fc173561afbaea54c2.zip | |
Add seq-mapcat
* lisp/emacs-lisp/seq.el (seq-mapcat): New function
* test/automated/seq-tests.el: Add unit tests for seq-mapcat
Diffstat (limited to 'test')
| -rw-r--r-- | test/ChangeLog | 4 | ||||
| -rw-r--r-- | test/automated/seq-tests.el | 10 |
2 files changed, 13 insertions, 1 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 23c48708b6c..9ae9db3f8fb 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2015-02-02 Nicolas Petton <nicolas@petton.fr> | ||
| 2 | |||
| 3 | * automated/seq-tests.el: New test for seq-mapcat. | ||
| 4 | |||
| 1 | 2015-02-05 Artur Malabarba <bruce.connor.am@gmail.com> | 5 | 2015-02-05 Artur Malabarba <bruce.connor.am@gmail.com> |
| 2 | 6 | ||
| 3 | * automated/package-test.el (package-test-get-deps): Fix typo. | 7 | * automated/package-test.el (package-test-get-deps): Fix typo. |
diff --git a/test/automated/seq-tests.el b/test/automated/seq-tests.el index 23989799306..cc89c889675 100644 --- a/test/automated/seq-tests.el +++ b/test/automated/seq-tests.el | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2014-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2014-2015 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Nicolas Petton <petton.nicolas@gmail.com> | 5 | ;; Author: Nicolas Petton <nicolas@petton.fr> |
| 6 | ;; Maintainer: emacs-devel@gnu.org | 6 | ;; Maintainer: emacs-devel@gnu.org |
| 7 | 7 | ||
| 8 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| @@ -197,5 +197,13 @@ Evaluate BODY for each created sequence. | |||
| 197 | (should (equal (seq-concatenate 'vector nil '(8 10)) [8 10])) | 197 | (should (equal (seq-concatenate 'vector nil '(8 10)) [8 10])) |
| 198 | (should (equal (seq-concatenate 'vector seq nil) [2 4 6])))) | 198 | (should (equal (seq-concatenate 'vector seq nil) [2 4 6])))) |
| 199 | 199 | ||
| 200 | (ert-deftest test-seq-mapcat () | ||
| 201 | (should (equal (seq-mapcat #'seq-reverse '((3 2 1) (6 5 4))) | ||
| 202 | '(1 2 3 4 5 6))) | ||
| 203 | (should (equal (seq-mapcat #'seq-reverse '[(3 2 1) (6 5 4)]) | ||
| 204 | '(1 2 3 4 5 6))) | ||
| 205 | (should (equal (seq-mapcat #'seq-reverse '((3 2 1) (6 5 4)) 'vector) | ||
| 206 | '[1 2 3 4 5 6]))) | ||
| 207 | |||
| 200 | (provide 'seq-tests) | 208 | (provide 'seq-tests) |
| 201 | ;;; seq-tests.el ends here | 209 | ;;; seq-tests.el ends here |