X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcondition.pure.lisp;h=f594e99af6f2a9b48102ee70fc6643f2630f2370;hb=cd13034f9415f64cdaa05893a4ac5ff1e95c97bd;hp=96cdd0fc8677a462070c559fa78a2b3b40bd7100;hpb=ce3d6da896e35c9e202db443c5cfc9fedcf65ebe;p=sbcl.git diff --git a/tests/condition.pure.lisp b/tests/condition.pure.lisp index 96cdd0f..f594e99 100644 --- a/tests/condition.pure.lisp +++ b/tests/condition.pure.lisp @@ -89,3 +89,20 @@ (foo () :test (lambda (c) (declare (ignore c)) visible) 'in2)) (foo () 'ext))))))) + +;;; First argument of CERROR is a format control +(assert + (eq (block nil + (handler-bind + ((type-error (lambda (c) (return :failed))) + (simple-error (lambda (c) + (return (if (find-restart 'continue) + :passed + :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))))))