Remove CVS $Id$ keyword
[clsql.git] / tests / test-internal.lisp
1 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
4 ;;;;
5 ;;;; Name:    test-internal.lisp
6 ;;;; Purpose: Tests for internal clsql functions
7 ;;;; Author:  Kevin M. Rosenberg
8 ;;;; Created: May 2004
9 ;;;;
10 ;;;; This file, part of CLSQL, is Copyright (c) 2004-2010 by Kevin M. Rosenberg
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-internal*
20   '(
21     (deftest :int/convert/1
22         (clsql-sys::prepared-sql-to-postgresql-sql "SELECT FOO FROM BAR")
23       "SELECT FOO FROM BAR")
24
25     (deftest :int/convert/2
26         (clsql-sys::prepared-sql-to-postgresql-sql "SELECT FOO FROM BAR WHERE ID=?")
27       "SELECT FOO FROM BAR WHERE ID=$1")
28
29     (deftest :int/convert/3
30         (clsql-sys::prepared-sql-to-postgresql-sql "SELECT FOO FROM \"BAR\" WHERE ID=? AND CODE=?")
31       "SELECT FOO FROM \"BAR\" WHERE ID=$1 AND CODE=$2")
32
33     (deftest :int/convert/4
34         (clsql-sys::prepared-sql-to-postgresql-sql "SELECT FOO FROM BAR WHERE ID=\"Match?\" AND CODE=?")
35       "SELECT FOO FROM BAR WHERE ID=\"Match?\" AND CODE=$1")
36
37     (deftest :int/convert/5
38         (clsql-sys::prepared-sql-to-postgresql-sql "SELECT 'FOO' FROM BAR WHERE ID='Match?''?' AND CODE=?")
39       "SELECT 'FOO' FROM BAR WHERE ID='Match?''?' AND CODE=$1")
40
41     ))
42