Colorize test output
authorOwen Rodley <Strigoides@gmail.com>
Sun, 28 Apr 2013 01:28:11 +0000 (13:28 +1200)
committerOwen Rodley <Strigoides@gmail.com>
Sun, 28 Apr 2013 01:28:11 +0000 (13:28 +1200)
Failures show up in red, and unexpected successes in orange

tests.lisp

index 8fcd862..6fce25e 100644 (file)
@@ -14,7 +14,9 @@
         (write-line ,(concat "Test `" (prin1-to-string condition) "' passed"))
         (incf *passed-tests*))
        (t
-        (write-line ,(concat "Test `" (prin1-to-string condition) "' failed."))
+        (write-line ,(concat "<font color=red>Test `"
+                             (prin1-to-string condition) 
+                             "' failed.</font>"))
         (incf *failed-tests*)))
      (incf *total-tests*)))
 
@@ -22,7 +24,9 @@
   `(progn
      (cond
        (,condition
-        (write-line ,(concat "Test `" (prin1-to-string condition) "' passed unexpectedly!"))
+        (write-line ,(concat "<font color=orange>Test `"
+                             (prin1-to-string condition)
+                             "' passed unexpectedly!</font>"))
         (incf *unexpected-passes*))
        (t
         (write-line ,(concat "Test `" (prin1-to-string condition) "' failed expectedly."))