X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Ftest-internal.lisp;fp=tests%2Ftest-internal.lisp;h=a67cc874d416f3fb074d9bbe0df16e6ba50136dc;hb=44cd3f817f6f59ffe495db4cf2b9ea4637a57f75;hp=0000000000000000000000000000000000000000;hpb=2f1b6b521b5c68e249428209a7da57f75e55da47;p=clsql.git diff --git a/tests/test-internal.lisp b/tests/test-internal.lisp new file mode 100644 index 0000000..a67cc87 --- /dev/null +++ b/tests/test-internal.lisp @@ -0,0 +1,44 @@ +;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: test-internal.lisp +;;;; Purpose: Tests for internal clsql functions +;;;; Author: Kevin M. Rosenberg +;;;; Created: May 2004 +;;;; +;;;; $Id: test-basic.lisp 9450 2004-05-23 10:51:02Z kevin $ +;;;; +;;;; This file, part of CLSQL, is Copyright (c) 2004 by Kevin M. Rosenberg +;;;; +;;;; 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-tests) + +(setq *rt-internal* + '( + (deftest :int/convert/1 + (clsql-sys::prepared-sql-to-postgresql-sql "SELECT FOO FROM BAR") + "SELECT FOO FROM BAR") + + (deftest :int/convert/2 + (clsql-sys::prepared-sql-to-postgresql-sql "SELECT FOO FROM BAR WHERE ID=?") + "SELECT FOO FROM BAR WHERE ID=$1") + + (deftest :int/convert/3 + (clsql-sys::prepared-sql-to-postgresql-sql "SELECT FOO FROM \"BAR\" WHERE ID=? AND CODE=?") + "SELECT FOO FROM \"BAR\" WHERE ID=$1 AND CODE=$2") + + (deftest :int/convert/4 + (clsql-sys::prepared-sql-to-postgresql-sql "SELECT FOO FROM BAR WHERE ID=\"Match?\" AND CODE=?") + "SELECT FOO FROM BAR WHERE ID=\"Match?\" AND CODE=$1") + + (deftest :int/convert/5 + (clsql-sys::prepared-sql-to-postgresql-sql "SELECT 'FOO' FROM BAR WHERE ID='Match?''?' AND CODE=?") + "SELECT 'FOO' FROM BAR WHERE ID='Match?''?' AND CODE=$1") + + )) +