|
|
@ -1,5 +1,10 @@
|
|
|
|
#lang sugar/debug racket
|
|
|
|
#lang sugar/debug racket
|
|
|
|
(require rackunit)
|
|
|
|
(require rackunit
|
|
|
|
|
|
|
|
(for-meta 1 (only-in racket/base begin-for-syntax))
|
|
|
|
|
|
|
|
(for-meta 2 (only-in racket/base begin-for-syntax))
|
|
|
|
|
|
|
|
(for-meta 3 (only-in racket/base let #%app open-output-string get-output-string parameterize
|
|
|
|
|
|
|
|
current-error-port #%datum)
|
|
|
|
|
|
|
|
rackunit))
|
|
|
|
(let ([out (open-output-string)]
|
|
|
|
(let ([out (open-output-string)]
|
|
|
|
[let "something else"]
|
|
|
|
[let "something else"]
|
|
|
|
[local-require "something else entirely"]
|
|
|
|
[local-require "something else entirely"]
|
|
|
@ -12,4 +17,12 @@
|
|
|
|
[report/line "outta the blue!"])
|
|
|
|
[report/line "outta the blue!"])
|
|
|
|
(parameterize ([current-error-port out])
|
|
|
|
(parameterize ([current-error-port out])
|
|
|
|
#RR5)
|
|
|
|
#RR5)
|
|
|
|
(check-equal? (get-output-string out) "5 = 5 on line 14\n"))
|
|
|
|
(check-equal? (get-output-string out) "5 = 5 on line 19\n"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(begin-for-syntax
|
|
|
|
|
|
|
|
(begin-for-syntax
|
|
|
|
|
|
|
|
(begin-for-syntax
|
|
|
|
|
|
|
|
(let ([out (open-output-string)])
|
|
|
|
|
|
|
|
(parameterize ([current-error-port out])
|
|
|
|
|
|
|
|
#RR5)
|
|
|
|
|
|
|
|
(check-equal? (get-output-string out) "5 = 5 on line 27\n")))))
|
|
|
|