X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=contrib%2Fsb-simple-streams%2Fsimple-stream-tests.lisp;h=557fb631eef381753163b55d6d96f0e559870405;hb=54b330585ed41edeb93a289f0e59aec67fa9ded9;hp=a845bd553d5221fe338113007f8e2e9297594a0b;hpb=a72df65cd95038f7338cf7874b824138a3d79077;p=sbcl.git diff --git a/contrib/sb-simple-streams/simple-stream-tests.lisp b/contrib/sb-simple-streams/simple-stream-tests.lisp index a845bd5..557fb63 100644 --- a/contrib/sb-simple-streams/simple-stream-tests.lisp +++ b/contrib/sb-simple-streams/simple-stream-tests.lisp @@ -118,11 +118,11 @@ (deftest write-read-inet (handler-case (with-open-stream (s (make-instance 'socket-simple-stream - :remote-host #(127 0 0 1) - :remote-port 7 + :remote-host #(127 0 0 1) + :remote-port 7 :direction :io)) - (string= (prog1 (write-line "Got it!" s) (finish-output s)) - (read-line s))) + (string= (prog1 (write-line "Got it!" s) (finish-output s)) + (read-line s))) ;; Fail gracefully if echo isn't activated on the system (sb-bsd-sockets::connection-refused-error () t)) t) @@ -428,7 +428,7 @@ Nothing to see here, move along.") T) (deftest line-length-dc-1 - ;; does LINE-LENGTH support simple streams? + ;; does LINE-LENGTH support simple streams? (with-dc-test-stream (s) (eql (sb-simple-streams:line-length s) (sb-kernel:line-length s))) @@ -908,3 +908,19 @@ Nothing to see here, move along.") (deftest string-simple-stream-1 (values (subtypep 'string-simple-stream 'string-stream)) T) + +;; don't break fd-stream external-format support: + +(deftest external-format-1 + (progn + (with-open-file (s *test-file* + :direction :output + :if-exists :supersede + :element-type '(unsigned-byte 8)) + (write-byte 195 s) + (write-byte 132 s)) + (with-open-file (s *test-file* + :direction :input + :external-format :utf-8) + (char-code (read-char s)))) + 196)