It would be very useful for integrating into automated build systems
if clojure.test/run-tests returned a true/false value depending on
whether the tests pass. It's pretty easy to do this by changing
report's :summary method as shown below.

Thoughts?

-Phil

diff --git a/src/clj/clojure/test.clj b/src/clj/clojure/test.clj
index 37cdd7e..214d3cc 100644
--- a/src/clj/clojure/test.clj
+++ b/src/clj/clojure/test.clj
@@ -579,7 +579,8 @@ Chas Emerick, Allen Rohner, and Stuart Halloway",
   (with-test-out
    (println "\nRan" (:test m) "tests containing"
             (+ (:pass m) (:fail m) (:error m)) "assertions.")
-   (println (:fail m) "failures," (:error m) "errors.")))
+   (println (:fail m) "failures," (:error m) "errors."))
+  (= 0 (:fail m) (:error m)))

 (defmethod report :begin-test-ns [m]
   (with-test-out
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to