diff --git a/test-suite/ChangeLog b/test-suite/ChangeLog index bc8597f7e..036069e55 100644 --- a/test-suite/ChangeLog +++ b/test-suite/ChangeLog @@ -1,3 +1,12 @@ +2003-11-09 Dirk Herrmann + + * tests/optargs.test: Wrap tests in module (test-suite + test-). Rewrite test to be R5RS + conforming. + + * tests/syntax.test: Added test to check correct handling of + internal defines. + 2003-11-08 Dirk Herrmann * tests/syntax.test (exception:missing-body-expr): New. diff --git a/test-suite/tests/optargs.test b/test-suite/tests/optargs.test index 4f356b020..ba2fe8596 100644 --- a/test-suite/tests/optargs.test +++ b/test-suite/tests/optargs.test @@ -18,12 +18,15 @@ ;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330, ;;;; Boston, MA 02111-1307 USA -(use-modules (test-suite lib) - (ice-9 optargs)) +(define-module (test-suite test-optargs) + :use-module (test-suite lib) + :use-module (ice-9 optargs)) (with-test-prefix "optional argument processing" - (define* (test-1 #:optional (x 0)) - (define d 1) ; local define - #t) (pass-if "local defines work with optional arguments" - (false-if-exception (test-1)))) + (eval '(begin + (define* (test-1 #:optional (x 0)) + (define d 1) ; local define + #t) + (false-if-exception (test-1))) + (interaction-environment)))) diff --git a/test-suite/tests/syntax.test b/test-suite/tests/syntax.test index 3a0b8c982..37a8fbe4b 100644 --- a/test-suite/tests/syntax.test +++ b/test-suite/tests/syntax.test @@ -643,6 +643,16 @@ (eq? 'c (a 2) (a 5)))) (interaction-environment)))) + (expect-fail "internal defines with macro application" + (false-if-exception + (eval '(begin + (defmacro a forms + (cons 'define forms)) + (let ((c identity) (x #t)) + (define (a x y) (and x y)) + (a (c x) (c x)))) + (interaction-environment)))) + (pass-if-exception "missing body expression" exception:missing-body-expr (eval '(let () (define x #t))