X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=tests%2Ftest-connection.lisp;h=11d3cc43fe2ec92af5a3f9699028ed1a0cf3a62f;hp=7680917bb103523cc05bbf1dbf743f60bb80069a;hb=9bbed78051e80e6ab76ae47834136035602bbbf1;hpb=7f0e4a65d1b425f2fa58fc7cce8296c1a6c52c2f diff --git a/tests/test-connection.lisp b/tests/test-connection.lisp index 7680917..11d3cc4 100644 --- a/tests/test-connection.lisp +++ b/tests/test-connection.lisp @@ -1,24 +1,39 @@ ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- ;;;; ====================================================================== ;;;; File: test-connection.lisp -;;;; Author: Marcus Pearce +;;;; Authors: Marcus Pearce , Kevin Rosenberg ;;;; Created: 30/03/2004 -;;;; Updated: <04/04/2004 11:53:49 marcusp> -;;;; ====================================================================== +;;;; Updated: $Id$ ;;;; -;;;; Description ========================================================== -;;;; ====================================================================== +;;;; Tests for CLSQL database connections. ;;;; -;;;; Tests for CLSQL-USQL database connections. +;;;; This file is part of CLSQL. ;;;; +;;;; CLSQL users are granted the rights to distribute and use this software +;;;; as governed by the terms of the Lisp Lesser GNU Public License +;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. ;;;; ====================================================================== -(in-package :clsql-usql-tests) - +(in-package #:clsql-tests) +(setq *rt-connection* + '( + (deftest :connection/1 - (let ((database (usql:find-database - (usql:database-name usql:*default-database*) - :db-type (usql:database-type usql:*default-database*)))) - (eql (usql:database-type database) *test-database-type*)) + (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*)) t) + +(deftest :connection/2 + (clsql-base::string-to-list-connection-spec + "localhost/dbname/user/passwd") + ("localhost" "dbname" "user" "passwd")) + +(deftest :connection/3 + (clsql-base::string-to-list-connection-spec + "dbname/user@hostname") + ("hostname" "dbname" "user")) + +))