Skip to content
Snippets Groups Projects
Commit 1c5a201b authored by pfdietz's avatar pfdietz
Browse files

Finish concatenated stream tests, and add tests of get-output-stream-string

parent 96d0679f
No related branches found
No related tags found
No related merge requests found
...@@ -23,3 +23,5 @@ Things to do to the test suite (not a complete list) ...@@ -23,3 +23,5 @@ Things to do to the test suite (not a complete list)
11. Address issues with broadcast streams (C. Rhodes) -- apparent 11. Address issues with broadcast streams (C. Rhodes) -- apparent
contradictions in the spec. contradictions in the spec.
12. Make sure all string operators work on displaced character vectors.
\ No newline at end of file
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sat Feb 14 09:48:46 2004
;;;; Contains: Tests of GET-OUTPUT-STREAM-STRING
(in-package :cl-test)
;; this function is used extensively elsewhere in the test suite
(deftest get-output-stream-string.1
(let ((s (make-string-output-stream)))
(values
(get-output-stream-string s)
(write-string "abc" s)
(write-string "def" s)
(get-output-stream-string s)
(get-output-stream-string s)))
"" "abc" "def" "abcdef" "")
;;; Error cases
(deftest get-output-stream-string.error.1
(signals-error (get-output-stream-string) t)
t)
(deftest get-output-stream-string.error.2
(signals-error (get-output-stream-string (make-string-output-stream) nil) t)
t)
...@@ -46,4 +46,5 @@ ...@@ -46,4 +46,5 @@
(load "echo-stream-output-stream.lsp") (load "echo-stream-output-stream.lsp")
(load "make-echo-stream.lsp") (load "make-echo-stream.lsp")
(load "concatenated-stream-streams.lsp") (load "concatenated-stream-streams.lsp")
(load "make-concatenated-stream.lsp") (load "make-concatenated-stream.lsp")
\ No newline at end of file (load "get-output-stream-string.lsp")
...@@ -295,6 +295,16 @@ ...@@ -295,6 +295,16 @@
(listen s)))) (listen s))))
nil) nil)
(deftest make-concatenated-stream.32
(clear-input (make-concatenated-stream))
nil)
(deftest make-concatenated-stream.33
(with-input-from-string
(s1 "abc")
(clear-input (make-concatenated-stream s1)))
nil)
;;; Error cases ;;; Error cases
(deftest make-concatenated-stream.error.1 (deftest make-concatenated-stream.error.1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment