r9336: 12 May 2004 Kevin Rosenberg (kevin@rosenberg.net)
[clsql.git] / tests / test-connection.lisp
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
6 ;;;; Updated: $Id$
7 ;;;;
8 ;;;; Tests for CLSQL database connections. 
9 ;;;;
10 ;;;; This file is part of CLSQL.
11 ;;;;
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 ;;;; ======================================================================
16
17 (in-package #:clsql-tests)
18
19 (setq *rt-connection*
20       '(
21         
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*))
27   t)
28
29 (deftest :connection/2
30     (clsql-sys::string-to-list-connection-spec 
31      "localhost/dbname/user/passwd")
32   ("localhost" "dbname" "user" "passwd"))
33
34 (deftest :connection/3
35     (clsql-sys::string-to-list-connection-spec 
36      "dbname/user@hostname")
37   ("hostname" "dbname" "user"))
38
39 ))