make SOCKET-RECEIVE work correctly when receiving overly-long UDP packets
[sbcl.git] / contrib / sb-cover / tests.lisp
index 6fb3d9a..ea54b75 100644 (file)
 (load (compile-file (merge-pathnames #p"test-data-1.lisp" *path*)))
 (report-expect-failure)
 
-;;; Instrument the file, try again
+;;; Instrument the file, try again -- first with a non-directory pathname
 
 (proclaim '(optimize sb-cover:store-coverage-data))
 (load (compile-file (merge-pathnames #p"test-data-1.lisp" *path*)))
 
+(catch 'ok
+  (handler-case
+      (sb-cover:report #p"/tmp/foo")
+    (error ()
+      (throw 'ok nil)))
+  (error "REPORT with a non-pathname directory did not signal an error."))
+
 (report)
 
 (assert (probe-file (make-pathname :name "cover-index" :type "html"
 ;; Complete branch coverage
 (assert (= (sb-cover::ok-of (getf sb-cover::*counts* :branch))
            (sb-cover::all-of (getf sb-cover::*counts* :branch))))
+
+;; Check for presence of constant coalescing bugs
+
+(load (compile-file (merge-pathnames #p"test-data-3.lisp" *path*)))
+(test-2)
+
+;; Clean up after the tests
+
+(map nil #'delete-file
+     (directory (merge-pathnames #p"*.html" *output-directory*)))