Skip to content

Tests stop at peek-char.2 #29

@Affonso-Gui

Description

@Affonso-Gui

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions