1
0
mirror of synced 2026-05-03 06:39:40 +00:00
Files
Interlisp.medley/internal/test/LANGUAGE/AUTO/CLSTREAMS-REGRESSION.TEST

45 lines
1.5 KiB
Plaintext

;;; Regression test for open accepting cl:character as element-type.
(do-test "open with character element-type"
(close (open "{nodircore}" :direction :output
:element-type 'character)))
;;; Regression test for open accepting cl:character as element-type.
(do-test "charset applied to two-way and broadcast streams"
(and (il:charset
(make-two-way-stream
(il:getstream t 'il:input)
(il:getstream t 'il:output)) 0)
(il:charset
(make-broadcast-stream (il:getstream t 'il:output))
0)))
;;; Regression test for AR 7525 to have openstream assign the file ;;; types of the file based upon the :element-type.
(do-test "open assign filetype unsigned-byte"
(setq foo (open "{core}foo" :direction :output :element-type 'unsigned-byte))
(eq (IL:getfileinfo foo 'type) 'il:binary)
(close foo)
(delete-file "{core}foo"))
(do-test "open assign filetype signed-byte"
(setq foo (open "{core}foo" :direction :output :element-type 'signed-byte))
(eq (IL:getfileinfo foo 'type) 'il:binary)
(close foo)
(delete-file "{core}foo"))
(do-test "open assign filetype character"
(setq foo (open "{core}foo" :direction :output :element-type 'character))
(eq (IL:getfileinfo foo 'type) 'il:text)
(close foo)
(delete-file "{core}foo"))
(do-test "open assign filetype string-char"
(setq foo (open "{core}foo" :direction :output :element-type 'string-char))
(eq (IL:getfileinfo foo 'type) 'il:text)
(close foo)
(delete-file "{core}foo"))