Added debug! which is run! but enters the debugger on errors
authorAttila Lendvai <attila.lendvai@gmail.com>
Tue, 7 Nov 2006 14:21:17 +0000 (15:21 +0100)
committerattila.lendvai <attila.lendvai@gmail.com>
Tue, 7 Nov 2006 14:21:17 +0000 (15:21 +0100)
src/packages.lisp
src/run.lisp

index c8f8cb2..ddd6ba0 100644 (file)
@@ -62,6 +62,7 @@
            #:explain
            #:explain!
            #:run!
+           #:debug!
            #:!
            #:!!
            #:!!!
index dbdd4ed..7ff6692 100644 (file)
@@ -208,6 +208,12 @@ run."))
 detailed-text-explainer with output going to *test-dribble*"
   (explain (make-instance 'detailed-text-explainer) result-list *test-dribble*))
 
+(defun debug! (&optional (test-spec *suite*))
+  "Calls (run! test-spec) but enters the debugger if any kind of error happens."
+  (let ((*debug-on-error* t)
+        (*debug-on-failure* t))
+    (run! test-spec)))
+
 (defun run (test-spec)
     "Run the test specified by TEST-SPEC.