fix printing of namespace with places enabled
This commit goes with 62acb298bd
.
This commit is contained in:
parent
ab0e78122c
commit
701c9666d6
|
@ -501,6 +501,23 @@
|
|||
(let ([n-ns (eval '(module->namespace ''n) ns)])
|
||||
(test 5 eval '(lambda (x) x) n-ns)))))
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Check printing of resolved module paths
|
||||
|
||||
(let ([s (open-output-string)])
|
||||
(print (make-resolved-module-path (build-path (current-directory) "a.rkt")) s)
|
||||
(test #t regexp-match? #rx"<resolved-module-path:\"" (get-output-string s)))
|
||||
(let ([s (open-output-string)])
|
||||
(print (make-resolved-module-path 'other) s)
|
||||
(test #t regexp-match? #rx"<resolved-module-path:'" (get-output-string s)))
|
||||
|
||||
(let ([s (open-output-string)])
|
||||
(print (module->namespace 'scheme/base) s)
|
||||
(test #t regexp-match? #rx"<namespace:\"" (get-output-string s)))
|
||||
(let ([s (open-output-string)])
|
||||
(print (module->namespace ''n) s)
|
||||
(test #t regexp-match? #rx"<namespace:'" (get-output-string s)))
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(report-errs)
|
||||
|
|
|
@ -2565,7 +2565,7 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht,
|
|||
int is_sym;
|
||||
|
||||
modname = ((Scheme_Env *)obj)->module->modname;
|
||||
is_sym = SCHEME_SYMBOLP(SCHEME_PTR_VAL(modname));
|
||||
is_sym = !SCHEME_PATHP(SCHEME_PTR_VAL(modname));
|
||||
print_utf8_string(pp, (is_sym ? "'" : "\""), 0, 1);
|
||||
print(SCHEME_PTR_VAL(modname), 0, 0, ht, mt, pp);
|
||||
PRINTADDRESS(pp, modname);
|
||||
|
|
Loading…
Reference in New Issue
Block a user