;;; bug 350: bignum printing so memory-hungry that heap runs out
;;; -- just don't stall here forever on a slow box
-(with-test (:name bug-350 :fails-on :win32)
+(with-test (:name bug-350)
(handler-case
(with-timeout 10
(print (ash 1 1000000)))
(timeout ()
(error "Endless loop in FORMAT"))))
+(with-test (:name :format-type-check)
+ (assert (equal "1/10" (format nil "~2r" 1/2)))
+ (assert (raises-error? (format nil "~r" 1.32) sb-format:format-error))
+ (assert (raises-error? (format nil "~c" 1.32) sb-format:format-error))
+ (assert (equal "1/10" (eval '(format nil "~2r" 1/2))))
+ (assert (raises-error? (eval '(format nil "~r" 1.32)) sb-format:format-error))
+ (assert (raises-error? (eval '(format nil "~c" 1.32)) sb-format:format-error)))
+
;;; success