Ensure report column is wide enough for longest test name
[clsql.git] / tests / test-init.lisp
index bd8fc99a86a45f3f4d12e780e083fc2715646843..a7f8a84c476b64f7023d16b5f255cf806d8aab6c 100644 (file)
 
            (format *report-stream* "~&Tests skipped:")
            (if skip-tests
-               (dolist (skipped skip-tests)
-                 (format *report-stream*
-                         "~&   ~30A ~A~%" (car skipped) (cdr skipped)))
+               (let ((max-test-name 20))
+                 (dolist (skipped skip-tests)
+                   (let ((len (length (symbol-name (car skipped)))))
+                     (when (> len max-test-name)
+                       (setq max-test-name len))))
+                 (let ((fmt (format nil "~~&  ~~~DA ~~A~~%" max-test-name)))
+                   (dolist (skipped skip-tests)
+                     (format *report-stream* fmt (car skipped) (cdr skipped)))))
                (format *report-stream* " None~%")))
     (disconnect)))
 
                            '(:postgresql :postgresql-socket)))
                (clsql-sys:in test
                              :time/pg/fdml/usec :time/pg/oodml/no-usec :time/pg/oodml/usec))
-          (push (cons test "cant run the same date/time tests everywhere that we do on postgres because there are not standard datetime database types.")
+          (push (cons test "Postgres specific test.")
                 skip-tests))
          ((and (member *test-database-underlying-type* '(:mysql))
                (clsql-sys:in test :time/cross-platform/usec/no-tz :time/cross-platform/usec/tz))
-          (push (cons test "Mysql does not support fractional seconds (on timestamp columns), see http://forge.mysql.com/worklog/task.php?id=946 perhaps?")
+          (push (cons test "MySQL does not support fractional seconds on timestamp columns (http://forge.mysql.com/worklog/task.php?id=946).")
                 skip-tests))
 
           (t