0.8.11.6:
[sbcl.git] / tests / condition.pure.lisp
index cf6bb96..0a4dd84 100644 (file)
                                         :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)))