svn: r501
This commit is contained in:
Robby Findler 2005-07-30 16:09:46 +00:00
parent 15cf82a476
commit e8eeca4601
2 changed files with 37 additions and 2 deletions

View File

@ -369,8 +369,8 @@
port) port)
1] 1]
[(syntax? value) [(syntax? value)
(write-special (render-syntax/snip value))] (write-special (render-syntax/snip value) port)]
[else (write-special (value->snip value))]))] [else (write-special (value->snip value) port)]))]
[print-graph [print-graph
;; only turn on print-graph when using `write' printing ;; only turn on print-graph when using `write' printing
;; style because the sharing is being taken care of ;; style because the sharing is being taken care of

View File

@ -573,6 +573,41 @@ There shouldn't be any error (but add in a bug that triggers one to be sure!)
void void
void) void)
;; make sure syntax objects only go into good ports
(make-test "(define-syntax (foo stx) (with-handlers ([exn:fail? (lambda (x) #'10)]) (syntax-local-value #'foot))) (foo)"
"10"
"10"
#f
'interactions
#f
#f
#f
void
void)
;; make sure syntax objects don't go into bad ports
(make-test "(parameterize ([current-output-port (open-output-string)]) (write #'1))"
""
""
#f
'interactions
#f
#f
#f
void
void)
(make-test "(parameterize ([current-output-port (open-output-string)]) (fprintf (current-error-port) \"~e\" #'foot))"
"#<syntax::79>"
"#<syntax::79>"
#f
'interactions
#f
#f
#f
void
void)
(make-test (make-test
;; the begin/void combo is to make sure that no value printout ;; the begin/void combo is to make sure that no value printout
;; comes and messes up the source location for the error. ;; comes and messes up the source location for the error.