aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorBasil L. Contovounesios2019-04-09 17:05:27 +0100
committerBasil L. Contovounesios2019-04-12 14:25:36 +0100
commit0c4c96d7dc660ae8fa26c397bafff228996bcc51 (patch)
tree8d32e4cc0a8cb2177fa15b02b7f4d2b0b90e24d5 /test/src
parent9a54e70c184cd9f65f1141a1b1df87e9afb83d2f (diff)
downloademacs-0c4c96d7dc660ae8fa26c397bafff228996bcc51.tar.gz
emacs-0c4c96d7dc660ae8fa26c397bafff228996bcc51.zip
Move proper-list-p tests to fns-tests.el
This follows the move of proper-list-p from lisp/subr.el to src/fns.c in 2018-07-24T15:58:46-07:00!eggert@cs.ucla.edu. * test/lisp/subr-tests.el (subr-tests--proper-list-p): Move from here... * test/src/fns-tests.el (test-proper-list-p): ...to here.
Diffstat (limited to 'test/src')
-rw-r--r--test/src/fns-tests.el18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el
index d6cc99e8e33..6ebab4287f7 100644
--- a/test/src/fns-tests.el
+++ b/test/src/fns-tests.el
@@ -648,4 +648,22 @@
648 (should (equal (list (eq a b) n len) 648 (should (equal (list (eq a b) n len)
649 (list t n len)))))))) 649 (list t n len))))))))
650 650
651(ert-deftest test-proper-list-p ()
652 "Test `proper-list-p' behavior."
653 (dotimes (length 4)
654 ;; Proper and dotted lists.
655 (let ((list (make-list length 0)))
656 (should (= (proper-list-p list) length))
657 (should (not (proper-list-p (nconc list 0)))))
658 ;; Circular lists.
659 (dotimes (n (1+ length))
660 (let ((circle (make-list (1+ length) 0)))
661 (should (not (proper-list-p (nconc circle (nthcdr n circle))))))))
662 ;; Atoms.
663 (should (not (proper-list-p 0)))
664 (should (not (proper-list-p "")))
665 (should (not (proper-list-p [])))
666 (should (not (proper-list-p (make-bool-vector 0 nil))))
667 (should (not (proper-list-p (make-symbol "a")))))
668
651(provide 'fns-tests) 669(provide 'fns-tests)