
instead of printing all of them also, adjust the plai test suites to cope with test results going to two different places
8 lines
255 B
Racket
8 lines
255 B
Racket
#lang racket/base
|
|
(provide with-both-output-to-string)
|
|
(define (with-both-output-to-string thunk)
|
|
(define sp (open-output-string))
|
|
(parameterize ([current-output-port sp]
|
|
[current-error-port sp])
|
|
(thunk))
|
|
(get-output-string sp)) |