Update of /cvsroot/sbcl/sbcl/tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30154/tests
Modified Files:
print.impure.lisp
Log Message:
0.8.14.25:
Fix for ~<~:;~> and ~W/~I/~:T/~_/~<~:> interaction in CLHS
22.3.5.2.
Index: print.impure.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/tests/print.impure.lisp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- print.impure.lisp 11 Sep 2004 12:54:27 -0000 1.23
+++ print.impure.lisp 15 Sep 2004 17:54:08 -0000 1.24
@@ -251,5 +251,20 @@
;;; iteration, even if one argument is just a one-element list.
(assert (string= (format nil "~:{~A~^~}" '((A) (C D))) "AC"))
+;;; errors should be raised if pprint and justification are mixed
+;;; injudiciously...
+(dolist (x (list "~<~:;~>~_" "~<~:;~>~I" "~<~:;~>~W"
+ "~<~:;~>~:T" "~<~:;~>~<~:>" "~_~<~:;~>"
+ "~I~<~:;~>" "~W~<~:;~>" "~:T~<~:;~>" "~<~:>~<~:;~>"))
+ (assert (raises-error? (format nil x nil)))
+ (assert (raises-error? (format nil (eval `(formatter ,x)) nil))))
+;;; ...but not in judicious cases.
+(dolist (x (list "~<~;~>~_" "~<~;~>~I" "~<~;~>~W"
+ "~<~;~>~:T" "~<~;~>~<~>" "~_~<~;~>"
+ "~I~<~;~>" "~W~<~;~>" "~:T~<~;~>" "~<~>~<~;~>"
+ "~<~:;~>~T" "~T~<~:;~>"))
+ (assert (format nil x nil))
+ (assert (format nil (eval `(formatter ,x)) nil)))
+
;;; success
(quit :unix-status 104)
|