Merge branch 'master' of http://git.kpe.io/clsql
[clsql.git] / tests / utils.lisp
index ea117861319898bded8705c0577ca31c97b246c7..396e3030f629e99ae7e0f076b8756d7c1fc2ae93 100644 (file)
 
 (in-package #:clsql-tests)
 
+(defun %get-int (v)
+  (etypecase v
+    (string (parse-integer v :junk-allowed t))
+    (integer v)
+    (number (truncate v))))
+
 (defvar *config-pathname*
   (make-pathname :defaults (user-homedir-pathname)
                  :name ".clsql-test"
                  :type "config"))
 
 (defvar +all-db-types+
-  '(:postgresql :postgresql-socket :mysql :sqlite :sqlite3 :odbc :oracle
+  '(:postgresql :postgresql-socket :postgresql-socket3 :mysql :sqlite :sqlite3 :odbc :oracle
     #+allegro :aodbc))
 
 (defclass conn-specs ()
@@ -30,6 +36,7 @@
    (mysql :accessor mysql-spec :initform nil)
    (postgresql :accessor postgresql-spec :initform nil)
    (postgresql-socket :accessor postgresql-socket-spec :initform nil)
+   (postgresql-socket3 :accessor postgresql-socket3-spec :initform nil)
    (sqlite :accessor sqlite-spec :initform nil)
    (sqlite3 :accessor sqlite3-spec :initform nil)
    (odbc :accessor odbc-spec :initform nil)