Fix typos in docstrings and function names.
[sbcl.git] / contrib / sb-simple-streams / simple-stream-tests.lisp
index 2371fc8..20c5a8e 100644 (file)
               (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
@@ -941,7 +957,9 @@ Nothing to see here, move along.")
                  (sb-simple-streams::read-vector b stream
                                                  :endian-swap :network-order)
                  (aref b 0))))
-      (with-open-file (stream "lp491087.txt" :class 'file-simple-stream)
+      (with-open-file (stream
+                       (merge-pathnames #P"lp491087.txt" *test-path*)
+                       :class 'file-simple-stream)
         (let* ((start (file-position stream))
                (integer (read-big-int stream))
                (end (file-position stream)))