Allow skipped test name field width to be as narrow as possible
[clsql.git] / tests / test-init.lisp
index a7f8a84c476b64f7023d16b5f255cf806d8aab6c..00661e52e010a3c31d40fed41e4119e98455fbdb 100644 (file)
 
            (format *report-stream* "~&Tests skipped:")
            (if skip-tests
-               (let ((max-test-name 20))
-                 (dolist (skipped skip-tests)
+               (let ((max-test-name (length (symbol-name (caar skip-tests)))))
+                 (dolist (skipped (cdr skip-tests))
                    (let ((len (length (symbol-name (car skipped)))))
                      (when (> len max-test-name)
                        (setq max-test-name len))))
           (push (cons test "Postgres specific test.")
                 skip-tests))
          ((and (member *test-database-underlying-type* '(:mysql))
+               (clsql-sys:in test :time/cross-platform/msec
+                            :time/cross-platform/usec/no-tz :time/cross-platform/usec/tz))
+          (push (cons test "MySQL doesn't support fractional seconds on timestamp columns (http://forge.mysql.com/worklog/task.php?id=946).")
+                skip-tests))
+         ((and (member *test-database-underlying-type* '(:mssql))
                (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 (http://forge.mysql.com/worklog/task.php?id=946).")
+          (push (cons test "MSSQL doesn't support micro-seconds on datetime columns.")
                 skip-tests))
-
           (t
            (push test-form test-forms)))))
       (values (nreverse test-forms) (nreverse skip-tests))))