From e3585826886c694d40d2a0f3a28ce181dd66300b Mon Sep 17 00:00:00 2001 From: Attila Lendvai Date: Tue, 7 Nov 2006 15:21:17 +0100 Subject: [PATCH] Added debug! which is run! but enters the debugger on errors --- src/packages.lisp | 1 + src/run.lisp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/packages.lisp b/src/packages.lisp index c8f8cb2..ddd6ba0 100644 --- a/src/packages.lisp +++ b/src/packages.lisp @@ -62,6 +62,7 @@ #:explain #:explain! #:run! + #:debug! #:! #:!! #:!!! diff --git a/src/run.lisp b/src/run.lisp index dbdd4ed..7ff6692 100644 --- a/src/run.lisp +++ b/src/run.lisp @@ -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. -- 1.7.10.4