Skip to content
Snippets Groups Projects
Commit 0857e417 authored by pfdietz's avatar pfdietz
Browse files

Add test checking that the element type of a stream opened with element-type...

Add test checking that the element type of a stream opened with element-type :default is a character or integer type (if this can be determined with subtypep)
parent a7091afb
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,21 @@
(close s)))))
nil)
(deftest stream-element-type.6
:notes (:assume-no-simple-streams)
(let ((pn "foo.txt"))
(delete-all-versions pn)
(let ((s (open pn :direction :output
:element-type :default)))
(let ((etype (stream-element-type s)))
(unwind-protect
(multiple-value-bind (sub1 good1) (subtypep* etype 'integer)
(multiple-value-bind (sub2 good2) (subtypep* etype 'character)
(or (not good1)
(not good2)
sub1 sub2)))
(close s)))))
t)
(deftest stream-element-type.error.1
(signals-error (stream-element-type) program-error)
......
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