1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 09:10:22 +02:00

Improve error reporting in 'append!'

* libguile/list.c (scm_append_x): Report correct argument number when
  validating arguments.  Validate that the last cdr of each argument is
  null or nil.  Rename formal rest argument from 'lists' to 'args'.

* test-suite/tests/list.test (append!): Update tests to expect correct
  handling of improper lists.
This commit is contained in:
Mark H Weaver 2012-10-06 06:04:29 -04:00
parent 88644a10d8
commit 226a56a3d4
2 changed files with 13 additions and 10 deletions

View file

@ -439,15 +439,15 @@
(with-test-prefix "wrong argument"
(expect-fail-exception "improper list and empty list"
(pass-if-exception "improper list and empty list"
exception:wrong-type-arg
(append! (cons 1 2) '()))
(expect-fail-exception "improper list and list"
(pass-if-exception "improper list and list"
exception:wrong-type-arg
(append! (cons 1 2) (list 3 4)))
(expect-fail-exception "list, improper list and list"
(pass-if-exception "list, improper list and list"
exception:wrong-type-arg
(append! (list 1 2) (cons 3 4) (list 5 6)))