+(defvar *config-pathname* (make-pathname :name "test-clsql"
+ :type "config"
+ :defaults *load-truename*))
+(defparameter *config* nil)
+
+(defun do-test (&optional (interactive nil))
+ (if interactive
+ (test-interactive)
+ (if (probe-file *config-pathname*)
+ (with-open-file (stream *config-pathname* :direction :input)
+ (setq *config* (read stream))
+ (test-automated *config*))
+ (test-interactive))))
+
+(defun test-interactive ()
+ (do ((done nil))
+ (done)
+ (multiple-value-bind (spec type) (get-spec-and-type)
+ (if spec
+ (clsql-test-table spec type)
+ (setq done t)))))
+
+(defun test-automated (config)
+ (dolist (elem config)
+ (let ((type (car elem))
+ (spec (cadr elem)))
+ #-allegro
+ (unless (eq type :aodbc)
+ (clsql-test-table spec type))
+ #+allegro
+ (clsql-test-table spec type)))
+ )