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:
parent
c5ee095261
commit
1b0549522b
1 changed files with 21 additions and 0 deletions
|
@ -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?))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue