X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=tests%2Ftest-fdml.lisp;h=81fea97ea306c2dddf4ae77d8d28e5bce6ad4bdf;hp=1e2a92bd4dde28aaf5a3eb7c3882c1efa2ec90f5;hb=23b76563b25a517ad20f29d6dc5a65c8b958a042;hpb=afc88420d03b627b214473078c3adc201de2de80 diff --git a/tests/test-fdml.lisp b/tests/test-fdml.lisp index 1e2a92b..81fea97 100644 --- a/tests/test-fdml.lisp +++ b/tests/test-fdml.lisp @@ -221,7 +221,7 @@ (deftest :fdml/select/10 (clsql:select [last-name] :from [employee] :where [not [in [emplid] - [select [managerid] :from [company]]]] + [select [managerid] :from [company]]]] :flatp t :order-by [last-name]) ("Andropov" "Brezhnev" "Chernenko" "Gorbachev" "Kruschev" "Putin" "Stalin" @@ -285,8 +285,7 @@ ;; test if we are in a transaction (push (clsql:in-transaction-p) results) ;;Putin has got to go - (unless (eql *test-database-type* :mysql) - (clsql:delete-records :from [employee] :where [= [last-name] "Putin"])) + (clsql:delete-records :from [employee] :where [= [last-name] "Putin"]) ;;Should be nil (push (clsql:select [*] :from [employee] :where [= [last-name] "Putin"]) @@ -312,10 +311,9 @@ ;; test if we are in a transaction (push (clsql:in-transaction-p) results) ;;Putin has got to go - (unless (eql *test-database-type* :mysql) - (clsql:update-records [employee] - :av-pairs '((email "putin-nospam@soviet.org")) - :where [= [last-name] "Putin"])) + (clsql:update-records [employee] + :av-pairs '((email "putin-nospam@soviet.org")) + :where [= [last-name] "Putin"]) ;;Should be new value (push (clsql:select [email] :from [employee] :where [= [last-name] "Putin"] @@ -373,19 +371,18 @@ (let ((results '())) ;; check status (push (clsql:in-transaction-p) results) - (unless (eql *test-database-type* :mysql) - (handler-case - (clsql:with-transaction () - ;; valid update - (clsql:update-records [employee] - :av-pairs '((email "lenin-nospam@soviet.org")) - :where [= [emplid] 1]) - ;; invalid update which generates an error + (handler-case + (clsql:with-transaction () + ;; valid update + (clsql:update-records [employee] + :av-pairs '((email "lenin-nospam@soviet.org")) + :where [= [emplid] 1]) + ;; invalid update which generates an error (clsql:update-records [employee] - :av-pairs - '((emale "lenin-nospam@soviet.org")) - :where [= [emplid] 1])) - (clsql:clsql-sql-error () + :av-pairs + '((emale "lenin-nospam@soviet.org")) + :where [= [emplid] 1])) + (clsql:clsql-error () (progn ;; check status (push (clsql:in-transaction-p) results) @@ -393,7 +390,7 @@ (push (clsql:select [email] :from [employee] :where [= [emplid] 1] :flatp t) results) - (apply #'values (nreverse results))))))) + (apply #'values (nreverse results)))))) nil nil ("lenin@soviet.org")) ))