Commit ffc95e60 authored by pfdietz's avatar pfdietz
Browse files

Begin adding tests for make-string-input-stream

parent 1c5a201b
......@@ -48,3 +48,4 @@
(load "concatenated-stream-streams.lsp")
(load "make-concatenated-stream.lsp")
(load "get-output-stream-string.lsp")
(load "make-string-input-stream.lsp")
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sat Feb 14 18:36:48 2004
;;;; Contains: Tests for MAKE-STRING-INPUT-STREAM
(in-package :cl-test)
(deftest make-string-input-stream.1
(let ((s (make-string-input-stream "")))
(values
(notnot (typep s 'stream))
(notnot (streamp s))
(notnot (input-stream-p s))
(output-stream-p s)))
t t t nil)
(deftest make-string-input-stream.2
(let ((s (make-string-input-stream "abcd")))
(values
(notnot (typep s 'stream))
(notnot (streamp s))
(notnot (input-stream-p s))
(output-stream-p s)))
t t t nil)
(deftest make-string-input-stream.3
(let ((s (make-string-input-stream "abcd" 1)))
(values (read-line s)))
"bcd")
(deftest make-string-input-stream.4
(let ((s (make-string-input-stream "abcd" 0 2)))
(values (read-line s)))
"ab")
(deftest make-string-input-stream.5
(let ((s (make-string-input-stream "abcd" 1 nil)))
(values (read-line s)))
"bcd")
(deftest make-string-input-stream.6
(let ((str1 (make-array 6 :element-type 'character
:initial-contents "abcdef"
:fill-pointer 4)))
(let ((s (make-string-input-stream str1)))
(values (read-line s) (read-char s nil :eof))))
"abcd" :eof)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment