1 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; ======================================================================
3 ;;;; File: test-connection.lisp
4 ;;;; Authors: Marcus Pearce <m.t.pearce@city.ac.uk>, Kevin Rosenberg
5 ;;;; Created: 30/03/2004
8 ;;;; Tests for CLSQL database connections.
10 ;;;; This file is part of CLSQL.
12 ;;;; CLSQL users are granted the rights to distribute and use this software
13 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
14 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
15 ;;;; ======================================================================
17 (in-package #:clsql-tests
)
22 (deftest :connection
/1
23 (let ((database (clsql:find-database
24 (clsql:database-name clsql
:*default-database
*)
25 :db-type
(clsql-sys:database-type clsql
:*default-database
*))))
26 (eql (clsql-sys:database-type database
) *test-database-type
*))
29 (deftest :connection
/2
30 (clsql-sys::string-to-list-connection-spec
31 "localhost/dbname/user/passwd")
32 ("localhost" "dbname" "user" "passwd"))
34 (deftest :connection
/3
35 (clsql-sys::string-to-list-connection-spec
36 "dbname/user@hostname")
37 ("hostname" "dbname" "user"))