aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
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)