X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fformat.lisp;h=a3eae9d1777cc745a567d5d1ba8cc5756e0b22f0;hb=ebe7c315e2527ae59ce5544c4d117ead4dd04ff3;hp=73c69bdc3af98e2d7d63ad28b01be3efb35c8cc6;hpb=0081c7195ffecd2e99650961020719fcd66dea1d;p=jscl.git diff --git a/tests/format.lisp b/tests/format.lisp index 73c69bd..a3eae9d 100644 --- a/tests/format.lisp +++ b/tests/format.lisp @@ -4,4 +4,13 @@ (test (string= "a~a" (format nil "a~~a"))) -(test (string= "a\na" (format nil "a~%a"))) +(test (string= "a +a" (format nil "a~%a"))) + +(test (string= "this is foo" (format nil "this is ~a" "foo"))) +(test (string= "this is foo" (format nil "this is ~A" "foo"))) + +(test (string= "this is \"foo\"" (format nil "this is ~s" "foo"))) +(test (string= "this is \"foo\"" (format nil "this is ~S" "foo"))) + +(test (string= "this is 2" (format nil "this is ~*~A" 1 2)))