mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 20:30:28 +02:00
add (currently failing) test case for changing the current module inside
`begin' form * test-suite/tests/syncase.scm: ("expander detects changes to current-module"): New test case.
This commit is contained in:
parent
adbdfd6d24
commit
a2f7536db0
1 changed files with 12 additions and 0 deletions
|
@ -106,3 +106,15 @@
|
||||||
(pass-if "compiled macro-generating macro works"
|
(pass-if "compiled macro-generating macro works"
|
||||||
(eq? (eval '(kwote* foo) (current-module))
|
(eq? (eval '(kwote* foo) (current-module))
|
||||||
'foo)))
|
'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)))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue