mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2025-12-06 02:40:26 -08:00
tests: add a new test suite "stream"
Currently it contains only a check for a recently fixed bug in: streams: fix a braino in str_in_unread_char
This commit is contained in:
parent
a916a5ccff
commit
a887d040a2
2 changed files with 21 additions and 0 deletions
|
|
@ -28,6 +28,7 @@
|
|||
(:file "external-formats" :if-feature :unicode)
|
||||
(:file "unicode" :if-feature :unicode)
|
||||
(:file "complex")
|
||||
(:file "stream")
|
||||
(:file "wscl")))
|
||||
(:module stress-tests
|
||||
:default-component-class asdf:cl-source-file.lsp
|
||||
|
|
|
|||
20
src/tests/normal-tests/stream.lsp
Normal file
20
src/tests/normal-tests/stream.lsp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
;;;; -*- Mode: Lisp; Syntax: Common-Lisp; indent-tabs-mode: nil -*-
|
||||
;;;; vim: set filetype=lisp tabstop=8 shiftwidth=2 expandtab:
|
||||
|
||||
;;;; Author: Daniel Kochmański
|
||||
;;;; Created: 2025-07-22
|
||||
;;;; Contains: Stream tests (for encodings see the suite "eformat")
|
||||
|
||||
(in-package #:cl-test)
|
||||
|
||||
(suite 'stream)
|
||||
|
||||
(deftest stream.unread-signals-error ()
|
||||
(let ((stream (make-string-input-stream "jd")))
|
||||
(signals error (unread-char #\x stream))
|
||||
(is (char= #\j (read-char stream)))
|
||||
(is (char= #\d (read-char stream)))
|
||||
(finishes (unread-char #\d stream))
|
||||
(is (char= #\d (read-char stream)))
|
||||
(is (eql (read-char stream) :eof))))
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue