minimal tests for format
authorRaimon Grau <raimonster@gmail.com>
Fri, 26 Apr 2013 00:31:29 +0000 (02:31 +0200)
committerRaimon Grau <raimonster@gmail.com>
Fri, 26 Apr 2013 00:31:29 +0000 (02:31 +0200)
jscl.lisp
tests/format.lisp [new file with mode: 0644]

index 12b71cf..33b8f15 100644 (file)
--- a/jscl.lisp
+++ b/jscl.lisp
@@ -26,6 +26,7 @@
     ("toplevel"  :target)
     ;; Tests
     ("tests"            :test)
+    ("format"           :test)
     ("setf"             :test)
     ("eval"             :test)
     ("tests-report"     :test)))
diff --git a/tests/format.lisp b/tests/format.lisp
new file mode 100644 (file)
index 0000000..73c69bd
--- /dev/null
@@ -0,0 +1,7 @@
+(test (string= "a" (format nil "a")))
+
+(test (string= "~" (format nil "~~")))
+
+(test (string= "a~a" (format nil "a~~a")))
+
+(test (string= "a\na" (format nil "a~%a")))