mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 14:49:18 +02:00
Making custom port tests optional.
This commit is contained in:
parent
24b43e367b
commit
e2cae1558c
1 changed files with 31 additions and 25 deletions
|
@ -23,6 +23,12 @@
|
||||||
(call-with-input-string "abc\ndef"
|
(call-with-input-string "abc\ndef"
|
||||||
(lambda (in) (let ((line (read-line in))) (list line (read-line in))))))
|
(lambda (in) (let ((line (read-line in))) (list line (read-line in))))))
|
||||||
|
|
||||||
|
;; Custom ports are only supported with string streams (i.e. either
|
||||||
|
;; GNU fopencookie or BSD funopen).
|
||||||
|
|
||||||
|
(cond-expand
|
||||||
|
(string-streams
|
||||||
|
|
||||||
(test "null-output-port" #t
|
(test "null-output-port" #t
|
||||||
(let ((out (make-null-output-port)))
|
(let ((out (make-null-output-port)))
|
||||||
(write 1 out)
|
(write 1 out)
|
||||||
|
@ -51,6 +57,6 @@
|
||||||
(lambda (out)
|
(lambda (out)
|
||||||
(let ((out (make-filtered-output-port string-upcase out)))
|
(let ((out (make-filtered-output-port string-upcase out)))
|
||||||
(display "abc" out)
|
(display "abc" out)
|
||||||
(close-output-port out)))))
|
(close-output-port out)))))))
|
||||||
|
|
||||||
(test-end)
|
(test-end)
|
||||||
|
|
Loading…
Add table
Reference in a new issue