X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Ftest-connection.lisp;h=6c3bc97d6d4316ae75386f13b8e41f51d1a87686;hb=28158ccb2304a2a60f757e89d9df19c7f86313d9;hp=11d3cc43fe2ec92af5a3f9699028ed1a0cf3a62f;hpb=9bbed78051e80e6ab76ae47834136035602bbbf1;p=clsql.git diff --git a/tests/test-connection.lisp b/tests/test-connection.lisp index 11d3cc4..6c3bc97 100644 --- a/tests/test-connection.lisp +++ b/tests/test-connection.lisp @@ -5,7 +5,7 @@ ;;;; Created: 30/03/2004 ;;;; Updated: $Id$ ;;;; -;;;; Tests for CLSQL database connections. +;;;; Tests for CLSQL database connections. ;;;; ;;;; This file is part of CLSQL. ;;;; @@ -18,22 +18,35 @@ (setq *rt-connection* '( - + (deftest :connection/1 (let ((database (clsql:find-database (clsql:database-name clsql:*default-database*) - :db-type (clsql:database-type clsql:*default-database*)))) - (eql (clsql:database-type database) *test-database-type*)) + :db-type (clsql-sys:database-type clsql:*default-database*)))) + (eql (clsql-sys:database-type database) *test-database-type*)) t) (deftest :connection/2 - (clsql-base::string-to-list-connection-spec + (clsql-sys::string-to-list-connection-spec "localhost/dbname/user/passwd") ("localhost" "dbname" "user" "passwd")) (deftest :connection/3 - (clsql-base::string-to-list-connection-spec + (clsql-sys::string-to-list-connection-spec "dbname/user@hostname") ("hostname" "dbname" "user")) +(deftest :db/1 + (let ((inner-db-same) + (original-a) + (outer-db-unchanged)) + (print "test-connection-spec") + (print *test-connection-spec*) + (clsql:with-database (a '*test-connection-spec* :database-type *test-connection-db-type*) + (setq original-a a) + (clsql:with-database (b '*test-connection-spec* :database-type *test-connection-db-type*) + (setq inner-db-same (eq a b))) + (setq outer-db-unchanged (eq a original-a)))) + t t) + ))