Fixed GH issue #3 (again)
This commit is contained in:
parent
f57b1ecd06
commit
32a717c243
|
@ -19,6 +19,7 @@
|
|||
(variable-reference->namespace (#%variable-reference)))])
|
||||
#`(mod nam lang
|
||||
(modbeg
|
||||
(module code racket/base)
|
||||
(module* test racket/base
|
||||
(require repltest/private/run-interactions)
|
||||
(run-interactions (open-input-string #,(port->string in))
|
||||
|
|
|
@ -8,14 +8,15 @@
|
|||
rackunit
|
||||
repltest/private/util)
|
||||
|
||||
(define (run-interactions in-rest varref)
|
||||
(define res-mod
|
||||
(module-path-index-resolve
|
||||
(module-path-index-join '(submod "..")
|
||||
(variable-reference->module-path-index varref))))
|
||||
(dynamic-require res-mod #f)
|
||||
(define mod-ns (module->namespace res-mod))
|
||||
(run-interactions2 in-rest mod-ns))
|
||||
(define-syntax-rule (run-interactions in-rest varref)
|
||||
(begin
|
||||
(require (prefix-in "main-mod:" (submod "..")))
|
||||
(define res-mod
|
||||
(module-path-index-resolve
|
||||
(module-path-index-join '(submod "..")
|
||||
(variable-reference->module-path-index varref))))
|
||||
(define mod-ns (module->namespace res-mod))
|
||||
(run-interactions2 in-rest mod-ns)))
|
||||
|
||||
(define (run-interactions2 in-rest mod-ns)
|
||||
(let loop ()
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
;; gobbled-up by the preceeding read.
|
||||
(define x 0)
|
||||
(define (y) #R(- 3 2))
|
||||
(define-syntax (module->namespace stx) #'error)
|
||||
(provide module->namespace)
|
||||
'displayed
|
||||
(displayln "displayed too")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user