X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fstream.impure.lisp;h=71a7a8c3396d31f11c39c9aa3896031e0b084049;hb=64ec717cf13c44fb4571c1fd7fbd508551ecfe01;hp=8b5649d0413780f9c0f791bdae1c200c56ad1251;hpb=c6b35dc77f5b54857ffddf8f4a2b9493d7e8170f;p=sbcl.git diff --git a/tests/stream.impure.lisp b/tests/stream.impure.lisp index 8b5649d..71a7a8c 100644 --- a/tests/stream.impure.lisp +++ b/tests/stream.impure.lisp @@ -76,5 +76,22 @@ (close stream) (delete-file p)) +(assert (raises-error? (read-byte (make-string-input-stream "abc")) + type-error)) +(assert (raises-error? (with-open-file (s "/dev/zero") + (read-byte s)) + type-error)) +;;; bidirectional streams getting confused about their position +(let ((p "bidirectional-stream-test")) + (with-open-file (s p :direction :output :if-exists :supersede) + (with-standard-io-syntax + (format s "~S ~S ~S~%" 'these 'are 'symbols))) + (with-open-file (s p :direction :io :if-exists :overwrite) + (read s) + (with-standard-io-syntax + (prin1 'insert s))) + (with-open-file (s p) + (assert (string= (read-line s) "THESE INSERTMBOLS"))) + (delete-file p)) ;;; success (quit :unix-status 104)