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:
parent
24e720c8d5
commit
fe5b6bebaa
1 changed files with 14 additions and 0 deletions
|
@ -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")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue