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

* tests/ports.test: Add some regression tests for char-ready?.

This commit is contained in:
Jim Blandy 1999-08-01 08:06:01 +00:00
parent c5ee095261
commit 1b0549522b

View file

@ -226,3 +226,24 @@
(read-delimited! "\n" c port 'concat 3) (read-delimited! "\n" c port 'concat 3)
(pass-if "read-delimited! reads a first line" (pass-if "read-delimited! reads a first line"
(string=? c "defghighi\n!!!!!!!!!!")))))) (string=? c "defghighi\n!!!!!!!!!!"))))))
;;;; char-ready?
(call-with-input-string
"howdy"
(lambda (port)
(pass-if "char-ready? returns true on string port"
(char-ready? port))))
;;; This segfaults on some versions of Guile. We really should run
;;; the tests in a subprocess...
(call-with-input-string
"howdy"
(lambda (port)
(with-input-from-port
port
(lambda ()
(pass-if "char-ready? returns true on string port as default port"
(char-ready?))))))