annotate tests/automated/c-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 6bff4f219697
children 308d34e9f07d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
1 ;; Copyright (C) 2000 Martin Buchholz
5156
6bff4f219697 fix crash etc. in tests.c/c-tests.el
Ben Wing <ben@xemacs.org>
parents: 4747
diff changeset
2 ;; Copyright (C) 2010 Ben Wing.
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
3
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
4 ;; Author: Martin Buchholz <martin@xemacs.org>
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
5 ;; Maintainer: Martin Buchholz <martin@xemacs.org>
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
6 ;; Created: 1998
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
7 ;; Keywords: tests
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
8
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
9 ;; This file is part of XEmacs.
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
10
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
11 ;; XEmacs is free software; you can redistribute it and/or modify it
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
12 ;; under the terms of the GNU General Public License as published by
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
14 ;; any later version.
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
15
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
16 ;; XEmacs is distributed in the hope that it will be useful, but
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
19 ;; General Public License for more details.
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
20
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
24 ;; 02111-1307, USA.
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
25
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
26 ;;; Synched up with: Not in FSF.
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
27
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
28 ;;; Commentary:
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
29
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
30 ;;; Call tests in src/tests.c, which cannot be written using lisp only.
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
31 ;;; See test-harness.el for instructions on how to run these tests.
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
32
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
33 (eval-when-compile
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
34 (condition-case nil
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
35 (require 'test-harness)
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
36 (file-error
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
37 (push "." load-path)
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
38 (when (and (boundp 'load-file-name) (stringp load-file-name))
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
39 (push (file-name-directory load-file-name) load-path))
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
40 (require 'test-harness))))
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents:
diff changeset
41
5156
6bff4f219697 fix crash etc. in tests.c/c-tests.el
Ben Wing <ben@xemacs.org>
parents: 4747
diff changeset
42 (with-temp-buffer
6bff4f219697 fix crash etc. in tests.c/c-tests.el
Ben Wing <ben@xemacs.org>
parents: 4747
diff changeset
43 (when (boundp 'test-function-list) ; Only if configure --debug
6bff4f219697 fix crash etc. in tests.c/c-tests.el
Ben Wing <ben@xemacs.org>
parents: 4747
diff changeset
44 (loop for fun in test-function-list do
6bff4f219697 fix crash etc. in tests.c/c-tests.el
Ben Wing <ben@xemacs.org>
parents: 4747
diff changeset
45 ;; #### I hope there's no way we can signal ...
6bff4f219697 fix crash etc. in tests.c/c-tests.el
Ben Wing <ben@xemacs.org>
parents: 4747
diff changeset
46 (loop for result in (funcall fun) do
6bff4f219697 fix crash etc. in tests.c/c-tests.el
Ben Wing <ben@xemacs.org>
parents: 4747
diff changeset
47 (Assert (nth 1 result) (nth 2 result) (nth 0 result))))))