Commit 1d84bb97 authored by pfdietz's avatar pfdietz

Fixed open stream problem in read-sequence tests

parent 19064914
......@@ -188,18 +188,25 @@
(defmacro def-read-sequence-bv-test (name init args &rest expected)
`(deftest ,name
;; Create output file
(let ((os (open "temp.dat" :direction :output
(let (os)
(setq os (open "temp.dat" :direction :output
:element-type '(unsigned-byte 8)
:if-exists :supersede)))
:if-exists :supersede))
(loop for i in '(0 1 1 0 0 1 1 0 1 0 1 1 1 0)
do (write-byte i os))
(close os)
(let ((is (open "temp.dat" :direction :input
do (write-byte i os)))
(when os (close os))))
(let (is (bv (copy-seq ,init)))
(setq is (open "temp.dat" :direction :input
:element-type '(unsigned-byte 8)))
(bv (copy-seq ,init)))
(read-sequence bv is ,@args)
(when is (close is)))))
(def-read-sequence-bv-test #*00000000000000 ()
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