X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fprint.impure.lisp;h=302fb6e5a3e5323b8d9ca6663dd626d393d66243;hb=2e52fa05;hp=8fd8badd7e302107e89113269165e42c6ced6d05;hpb=3cd0a9aafc20ce12075f38ebaed86676c922fde2;p=sbcl.git diff --git a/tests/print.impure.lisp b/tests/print.impure.lisp index 8fd8bad..302fb6e 100644 --- a/tests/print.impure.lisp +++ b/tests/print.impure.lisp @@ -645,4 +645,12 @@ (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