mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-04 08:47:11 +00:00
Move cl-lib tests for caaXr to subr-tests.el
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-test-caaar) (cl-test-caadr): Move tests using a cl-lib alias from here... * test/lisp/subr-tests.el (subr-test-caaar, subr-test-caadr): ...to here. The functions under test are in subr.el.
This commit is contained in:
parent
e588fa45ce
commit
07e8ff7f0f
@ -417,22 +417,6 @@
|
||||
(should-error (cl-nth-value -1 (cl-values 2 3)) :type 'args-out-of-range)
|
||||
(should (string= (cl-nth-value 0 "only lists") "only lists")))
|
||||
|
||||
(ert-deftest cl-test-caaar ()
|
||||
(should (null (cl-caaar '())))
|
||||
(should (null (cl-caaar '(() (2)))))
|
||||
(should (null (cl-caaar '((() (2)) (a b)))))
|
||||
(should-error (cl-caaar '(1 2)) :type 'wrong-type-argument)
|
||||
(should-error (cl-caaar '((1 2))) :type 'wrong-type-argument)
|
||||
(should (= 1 (cl-caaar '(((1 2) (3 4))))))
|
||||
(should (null (cl-caaar '((() (3 4)))))))
|
||||
|
||||
(ert-deftest cl-test-caadr ()
|
||||
(should (null (cl-caadr '())))
|
||||
(should (null (cl-caadr '(1))))
|
||||
(should-error (cl-caadr '(1 2)) :type 'wrong-type-argument)
|
||||
(should (= 2 (cl-caadr '(1 (2 3)))))
|
||||
(should (equal '((2) (3)) (cl-caadr '((1) (((2) (3))) (4))))))
|
||||
|
||||
(ert-deftest cl-test-ldiff ()
|
||||
(let ((l '(1 2 3)))
|
||||
(should (null (cl-ldiff '() '())))
|
||||
|
@ -61,6 +61,25 @@
|
||||
(quote
|
||||
(0 font-lock-keyword-face))))))))
|
||||
|
||||
|
||||
;;;; List functions.
|
||||
|
||||
(ert-deftest subr-test-caaar ()
|
||||
(should (null (caaar '())))
|
||||
(should (null (caaar '(() (2)))))
|
||||
(should (null (caaar '((() (2)) (a b)))))
|
||||
(should-error (caaar '(1 2)) :type 'wrong-type-argument)
|
||||
(should-error (caaar '((1 2))) :type 'wrong-type-argument)
|
||||
(should (= 1 (caaar '(((1 2) (3 4))))))
|
||||
(should (null (caaar '((() (3 4)))))))
|
||||
|
||||
(ert-deftest subr-test-caadr ()
|
||||
(should (null (caadr '())))
|
||||
(should (null (caadr '(1))))
|
||||
(should-error (caadr '(1 2)) :type 'wrong-type-argument)
|
||||
(should (= 2 (caadr '(1 (2 3)))))
|
||||
(should (equal '((2) (3)) (caadr '((1) (((2) (3))) (4))))))
|
||||
|
||||
|
||||
;;;; Keymap support.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user