1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-28 16:00:22 +02:00

* tests/ports.test: Check that our input functions cope when

current-input-port is closed.
This commit is contained in:
Jim Blandy 1999-09-20 23:57:08 +00:00
parent 24e720c8d5
commit fe5b6bebaa

View file

@ -352,3 +352,17 @@
(lambda ()
(pass-if "char-ready? returns true on string port as default port"
(char-ready?))))))
;;;; Close current-input-port, and make sure everyone can handle it.
(with-test-prefix "closing current-input-port"
(for-each (lambda (procedure name)
(with-input-from-port
(call-with-input-string "foo" (lambda (p) p))
(lambda ()
(close-port (current-input-port))
(pass-if name
(signals-error? 'wrong-type-arg (procedure))))))
(list read read-char read-line)
'("read" "read-char" "read-line")))