X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-simple-streams%2Fsimple-stream-tests.lisp;h=20c5a8efc9214893a1a2892021385d13c018396d;hb=f057566fe993f008a9b34dc87b026e7c8ef2611d;hp=f0d5a7310f83ecc558fcd27e5f185504ef7315cf;hpb=cb00528cc3c9d6ddeba987ef15818c53109b7835;p=sbcl.git diff --git a/contrib/sb-simple-streams/simple-stream-tests.lisp b/contrib/sb-simple-streams/simple-stream-tests.lisp index f0d5a73..20c5a8e 100644 --- a/contrib/sb-simple-streams/simple-stream-tests.lisp +++ b/contrib/sb-simple-streams/simple-stream-tests.lisp @@ -60,6 +60,22 @@ (progn ,@body)) ,(when delete-afterwards `(ignore-errors (delete-file ,file)))))) +(deftest non-existent-class + (handler-case + (with-test-file (s *test-file* :class 'non-existent-stream) + nil) + ;; find-class will raise a simple-error + (simple-error (c) (search "There is no class" (simple-condition-format-control c)))) + 0) + +(deftest non-stream-class + (handler-case + (with-test-file (s *test-file* :class 'standard-class) + nil) + ;; Will fall through sb-simple-streams:open as it is no stream class. + (simple-error (c) (search "Don't know how to handle" (simple-condition-format-control c)))) + 0) + (deftest create-file-1 ;; Create a file-simple-stream, write data. (prog1