add (currently failing) test case for changing the current module inside
authorJulian Graham <julian.graham@aya.yale.edu>
Sat, 27 Feb 2010 20:04:56 +0000 (15:04 -0500)
committerJulian Graham <julian.graham@aya.yale.edu>
Sat, 27 Feb 2010 20:04:56 +0000 (15:04 -0500)
`begin' form

* test-suite/tests/syncase.scm: ("expander detects changes to current-module"):
  New test case.

test-suite/tests/syncase.test

index a7a79c4..715693d 100644 (file)
   (pass-if "compiled macro-generating macro works"
     (eq? (eval '(kwote* foo) (current-module))
          'foo)))
+
+(with-test-prefix "changes to expansion environment"
+  (pass-if "expander detects changes to current-module"
+    (false-if-exception
+      (compile '(begin
+                 (define-module (new-module))
+                 (define-syntax new-module-macro
+                   (lambda (stx)
+                     (syntax-case stx () 
+                       ((_ arg) (syntax arg)))))
+                 (new-module-macro #t))
+              #:env (current-module)))))