diff tests/automated/lisp-tests.el @ 5299:28651c24b3f8

Error in #'list-length if LIST is dotted; check for this error with #'mapcar src/ChangeLog addition: 2010-11-06 Aidan Kehoe <kehoea@parhasard.net> * fns.c (Flist_length): Error if LIST is dotted in this function; document this behaviour. tests/ChangeLog addition: 2010-11-06 Aidan Kehoe <kehoea@parhasard.net> * automated/lisp-tests.el (malformed-list): Check that #'mapcar, #'map and #'list-length throw this error when appropriate.
author Aidan Kehoe <kehoea@parhasard.net>
date Sat, 06 Nov 2010 14:51:13 +0000
parents 2474dce7304e
children 9f738305f80f
line wrap: on
line diff
--- a/tests/automated/lisp-tests.el	Tue Nov 02 20:19:39 2010 +0100
+++ b/tests/automated/lisp-tests.el	Sat Nov 06 14:51:13 2010 +0000
@@ -1040,6 +1040,12 @@
  1)
  "checking multiple values are correctly discarded in mapcar")
 
+(let ((malformed-list '(1 2 3 4 hi there . tail)))
+  (Check-Error malformed-list (mapcar #'identity malformed-list))
+  (Check-Error malformed-list (map nil #'eq [1 2 3 4]
+				   malformed-list))
+  (Check-Error malformed-list (list-length malformed-list)))
+
 ;;-----------------------------------------------------
 ;; Test vector functions
 ;;-----------------------------------------------------