-(defun get-spec (type spec-format)
- (let (spec)
- (format t "~&Connection Spec for ~A" (symbol-name type))
- (format t "~&------------------------------")
-
- (dolist (elem spec-format)
- (format t "~&Enter ~A: " elem)
- (push (read-line) spec))
- (nreverse spec)))
+(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)))
+ )
+
+(defun make-test-float (i)
+ (* i (expt 10 (* i 4))))