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

* libguile/eval.c (scm_m_case): Allow empty lists of case labels.

* test-suite/tests/syntax.test: Fixed and activated test of empty case
        label support.
This commit is contained in:
Dirk Herrmann 2003-10-11 01:52:25 +00:00
parent 2a6f7afe04
commit 58a2510b07
4 changed files with 19 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
* tests/syntax.test: Fixed and activated test of empty case label
support.
2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
* tests/syntax.test (exception:bad-expression,

View file

@ -509,6 +509,9 @@
(with-test-prefix "case"
(pass-if "clause with empty labels list"
(case 1 (() #f) (else #t)))
(with-test-prefix "case is hygienic"
(pass-if-exception "bound 'else is handled correctly"
@ -558,11 +561,6 @@
(eval '(case 1 ("foo" "bar"))
(interaction-environment)))
;; According to R5RS, the following one is syntactically correct.
;; (pass-if-exception "(case 1 (() \"bar\"))"
;; exception:bad/missing-clauses
;; (case 1 (() "bar")))
(pass-if-exception "(case 1 ((2) \"bar\") . \"foo\")"
exception:bad-expression
(eval '(case 1 ((2) "bar") . "foo")