59 |
(define exception:bad-cond-clause |
(define exception:bad-cond-clause |
60 |
(cons 'syntax-error "Bad cond clause")) |
(cons 'syntax-error "Bad cond clause")) |
61 |
|
|
|
(define exception:bad-var |
|
|
(cons 'misc-error "^bad variable")) |
|
|
|
|
62 |
|
|
63 |
(with-test-prefix "expressions" |
(with-test-prefix "expressions" |
64 |
|
|
608 |
(with-test-prefix "missing or extra expressions" |
(with-test-prefix "missing or extra expressions" |
609 |
|
|
610 |
(pass-if-exception "(set!)" |
(pass-if-exception "(set!)" |
611 |
exception:missing/extra-expr-misc |
exception:missing/extra-expr |
612 |
(eval '(set!) |
(eval '(set!) |
613 |
(interaction-environment))) |
(interaction-environment))) |
614 |
|
|
615 |
(pass-if-exception "(set! 1)" |
(pass-if-exception "(set! 1)" |
616 |
exception:missing/extra-expr-misc |
exception:missing/extra-expr |
617 |
(eval '(set! 1) |
(eval '(set! 1) |
618 |
(interaction-environment))) |
(interaction-environment))) |
619 |
|
|
620 |
(pass-if-exception "(set! 1 2 3)" |
(pass-if-exception "(set! 1 2 3)" |
621 |
exception:missing/extra-expr-misc |
exception:missing/extra-expr |
622 |
(eval '(set! 1 2 3) |
(eval '(set! 1 2 3) |
623 |
(interaction-environment)))) |
(interaction-environment)))) |
624 |
|
|
625 |
(with-test-prefix "bad variable" |
(with-test-prefix "bad variable" |
626 |
|
|
627 |
(pass-if-exception "(set! \"\" #t)" |
(pass-if-exception "(set! \"\" #t)" |
628 |
exception:bad-var |
exception:bad-variable |
629 |
(eval '(set! "" #t) |
(eval '(set! "" #t) |
630 |
(interaction-environment))) |
(interaction-environment))) |
631 |
|
|
632 |
(pass-if-exception "(set! 1 #t)" |
(pass-if-exception "(set! 1 #t)" |
633 |
exception:bad-var |
exception:bad-variable |
634 |
(eval '(set! 1 #t) |
(eval '(set! 1 #t) |
635 |
(interaction-environment))) |
(interaction-environment))) |
636 |
|
|
637 |
(pass-if-exception "(set! #t #f)" |
(pass-if-exception "(set! #t #f)" |
638 |
exception:bad-var |
exception:bad-variable |
639 |
(eval '(set! #t #f) |
(eval '(set! #t #f) |
640 |
(interaction-environment))) |
(interaction-environment))) |
641 |
|
|
642 |
(pass-if-exception "(set! #f #t)" |
(pass-if-exception "(set! #f #t)" |
643 |
exception:bad-var |
exception:bad-variable |
644 |
(eval '(set! #f #t) |
(eval '(set! #f #t) |
645 |
(interaction-environment))) |
(interaction-environment))) |
646 |
|
|
647 |
(pass-if-exception "(set! #\space #f)" |
(pass-if-exception "(set! #\space #f)" |
648 |
exception:bad-var |
exception:bad-variable |
649 |
(eval '(set! #\space #f) |
(eval '(set! #\space #f) |
650 |
(interaction-environment))))) |
(interaction-environment))))) |
651 |
|
|