(assert (string= (format nil (formatter "~:C") #\a) "a"))
;;; This used to trigger an AVER instead.
-(assert (raises-error? (format t "~>") sb-format:format-error))
+(assert (raises-error? (eval '(formatter "~>")) sb-format:format-error))
+(assert (raises-error? (eval '(format t "~>")) sb-format:format-error))
;;; readably printing hash-tables, check for circularity
(let ((x (cons 1 2))
(assert (string= (format nil "~R" (expt 10 63)) "one vigintillion"))
(assert (string= (format nil "~:R" (expt 10 63)) "one vigintillionth"))
+;;; too-clever cacheing for PRINT-OBJECT resulted in a bogus method
+;;; for printing RESTART objects. Check also CONTROL-STACK-EXHAUSTED
+;;; and HEAP-EXHAUSTED-ERROR.
+(let ((result (with-output-to-string (*standard-output*)
+ (princ (find-restart 'abort)))))
+ (assert (string/= result "#<" :end1 2)))
+(let ((result (with-output-to-string (*standard-output*)
+ (princ (make-condition 'sb-kernel::control-stack-exhausted)))))
+ (assert (string/= result "#<" :end1 2)))
+(let ((result (with-output-to-string (*standard-output*)
+ (princ (make-condition 'sb-kernel::heap-exhausted-error)))))
+ (assert (string/= result "#<" :end1 2)))
+
;;; success