509 |
|
|
510 |
(with-test-prefix "case" |
(with-test-prefix "case" |
511 |
|
|
512 |
|
(pass-if "clause with empty labels list" |
513 |
|
(case 1 (() #f) (else #t))) |
514 |
|
|
515 |
(with-test-prefix "case is hygienic" |
(with-test-prefix "case is hygienic" |
516 |
|
|
517 |
(pass-if-exception "bound 'else is handled correctly" |
(pass-if-exception "bound 'else is handled correctly" |
561 |
(eval '(case 1 ("foo" "bar")) |
(eval '(case 1 ("foo" "bar")) |
562 |
(interaction-environment))) |
(interaction-environment))) |
563 |
|
|
|
;; According to R5RS, the following one is syntactically correct. |
|
|
;; (pass-if-exception "(case 1 (() \"bar\"))" |
|
|
;; exception:bad/missing-clauses |
|
|
;; (case 1 (() "bar"))) |
|
|
|
|
564 |
(pass-if-exception "(case 1 ((2) \"bar\") . \"foo\")" |
(pass-if-exception "(case 1 ((2) \"bar\") . \"foo\")" |
565 |
exception:bad-expression |
exception:bad-expression |
566 |
(eval '(case 1 ((2) "bar") . "foo") |
(eval '(case 1 ((2) "bar") . "foo") |