X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcondition.pure.lisp;h=0a4dd84575f0371eb5b2c7aeb05190a626741093;hb=3a618201c9f2370bb8784217a866d000371769e5;hp=cf6bb965849691405a8e4b4febdc819d3d6dd2e4;hpb=893dd75069ad851efd19e3d0fa5a4de9e84b4868;p=sbcl.git diff --git a/tests/condition.pure.lisp b/tests/condition.pure.lisp index cf6bb96..0a4dd84 100644 --- a/tests/condition.pure.lisp +++ b/tests/condition.pure.lisp @@ -101,3 +101,16 @@ :failed))))) (cerror (formatter "Continue from ~A") "bug ~A" :bug))) :passed)) + +;;; clauses in HANDLER-CASE are allowed to have declarations (and +;;; indeed, only declarations) +(assert + (null (handler-case (error "foo") (error () (declare (optimize speed)))))) + +(handler-case + (handler-bind ((warning #'muffle-warning)) + (signal 'warning)) + ;; if it's a control error, it had better be printable + (control-error (c) (format nil "~A" c)) + ;; there had better be an error + (:no-error (&rest args) (error "No error: ~S" args)))