summaryrefslogtreecommitdiffstats
path: root/tests/011/special-1.txr
blob: 72ab844a679fb1f321f59b09ab030183a19dd394 (plain)
1
2
3
4
5
6
7
8
9
10
@(do
   (defmacro with-output-to-string ((var) . forms)
     '(let ((,var (make-string-output-stream)))
        (progn ,*forms (get-string-from-stream ,var))))

   (let ((x (with-output-to-string (*stdout*)
              [format *stdout* "wo"]
              (format t "rld!"))))
     (format *stdout* "Hello, ")
     (put-line x)))