X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Ftest-fdml.lisp;h=1e2a92bd4dde28aaf5a3eb7c3882c1efa2ec90f5;hb=72c5d9d0555b01290409dc2607935db823fa1f10;hp=342576fd536a920bea0f3cb10b1a16cae2d76785;hpb=5a6f424f3c8920f8f11bbf1e3aed6b4c2c7e6af8;p=clsql.git diff --git a/tests/test-fdml.lisp b/tests/test-fdml.lisp index 342576f..1e2a92b 100644 --- a/tests/test-fdml.lisp +++ b/tests/test-fdml.lisp @@ -3,21 +3,25 @@ ;;;; File: test-fdml.lisp ;;;; Author: Marcus Pearce ;;;; Created: 30/03/2004 -;;;; Updated: $Id: $ -;;;; ====================================================================== -;;;; -;;;; Description ========================================================== -;;;; ====================================================================== +;;;; Updated: $Id$ ;;;; ;;;; Tests for the CLSQL Functional Data Manipulation Language ;;;; (FDML). -;;;; +;;;; +;;;; 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-tests) #.(clsql:locally-enable-sql-reader-syntax) +(setq *rt-fdml* + '( + ;; inserts a record using all values only and then deletes it (deftest :fdml/insert/1 (progn @@ -203,19 +207,19 @@ (1 1 1 1 1 1 1 1 1 1)) (deftest :fdml/select/7 - (sql:select [max [emplid]] :from [employee] :flatp t) + (clsql:select [max [emplid]] :from [employee] :flatp t) ("10")) (deftest :fdml/select/8 - (sql:select [min [emplid]] :from [employee] :flatp t) + (clsql:select [min [emplid]] :from [employee] :flatp t) ("1")) (deftest :fdml/select/9 - (subseq (car (sql:select [avg [emplid]] :from [employee] :flatp t)) 0 3) + (subseq (car (clsql:select [avg [emplid]] :from [employee] :flatp t)) 0 3) "5.5") (deftest :fdml/select/10 - (sql:select [last-name] :from [employee] + (clsql:select [last-name] :from [employee] :where [not [in [emplid] [select [managerid] :from [company]]]] :flatp t @@ -234,7 +238,7 @@ (("Lenin"))) ;(deftest :fdml/select/11 -; (sql:select [emplid] :from [employee] +; (clsql:select [emplid] :from [employee] ; :where [= [emplid] [any [select [companyid] :from [company]]]] ; :flatp t) ; ("1")) @@ -392,4 +396,6 @@ (apply #'values (nreverse results))))))) nil nil ("lenin@soviet.org")) +)) + #.(clsql:restore-sql-reader-syntax-state)