diff options
Diffstat (limited to 'test/lisp/emacs-lisp/seq-tests.el')
-rw-r--r-- | test/lisp/emacs-lisp/seq-tests.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/seq-tests.el b/test/lisp/emacs-lisp/seq-tests.el index 1a27467d292..6249e486173 100644 --- a/test/lisp/emacs-lisp/seq-tests.el +++ b/test/lisp/emacs-lisp/seq-tests.el @@ -137,6 +137,14 @@ Evaluate BODY for each created sequence. (with-test-sequences (seq '()) (should (equal (seq-remove #'test-sequences-evenp seq) '())))) +(ert-deftest test-seq-remove-at-position () + (with-test-sequences (seq '(1 2 3 4)) + (should (same-contents-p (seq-remove-at-position seq 2) '(1 2 4))) + (should (same-contents-p (seq-remove-at-position seq 0) '(2 3 4))) + (should (same-contents-p (seq-remove-at-position seq 3) '(1 2 3))) + (should (eq (type-of (seq-remove-at-position seq 2)) + (type-of seq))))) + (ert-deftest test-seq-count () (with-test-sequences (seq '(6 7 8 9 10)) (should (equal (seq-count #'test-sequences-evenp seq) 3)) |