mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-28 14:00:31 +02:00
Second argument of ‘unread-string’ is optional.
Fixes <https://bugs.gnu.org/67063>. * doc/ref/api-io.texi (Venerable Port Interfaces): Bring unread-string procedure documentation in line with other procedures in the section. * libguile/ports.c (scm_unread_string): Make port argument optional. * test-suite/tests/ports.test: Test unread-char and unread-string without ports. * NEWS: Update. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
80d4055e42
commit
a222503a89
4 changed files with 7 additions and 5 deletions
|
@ -636,13 +636,13 @@
|
|||
(with-input-from-string "walk on the moon\nmoon"
|
||||
(lambda ()
|
||||
(read-char)
|
||||
(unread-char #\a (current-input-port))
|
||||
(unread-char #\a)
|
||||
(pass-if "unread-char"
|
||||
(char=? (read-char) #\a))
|
||||
(read-line)
|
||||
(let ((replacenoid "chicken enchilada"))
|
||||
(unread-char #\newline (current-input-port))
|
||||
(unread-string replacenoid (current-input-port))
|
||||
(unread-char #\newline)
|
||||
(unread-string replacenoid)
|
||||
(pass-if "unread-string"
|
||||
(string=? (read-line) replacenoid)))
|
||||
(pass-if "unread residue"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue