-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Common Lisp description:
peek-char &optional peek-type input-stream eof-error-p eof-value recursive-p => char
In eus we do not have peek-type, making the first argument be input-stream
.
If input-stream
is nil
*standard-input*
is used, if it is t
*terminal-io*
is used. https://github.com/euslisp/EusLisp/blob/master/lisp/c/lispio.c#L64-L65
Therefore,
(deftest peek-char.2
(with-input-from-string
(*standard-input* " ab")
(values
(peek-char)
(read-char)
(peek-char t)
(read-char)
(peek-char t)
(read-char)))
#\Space #\Space #\a #\a #\b #\b)
Stops at (peek-char t)
, waiting for terminal input.
Pressing enter makes the tests continue.
Metadata
Metadata
Assignees
Labels
No labels