X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Ftest-fdml.lisp;h=f067e1e48c3465352a7303796fa5cff20068786c;hb=2961f4f122593e9d4875e88e6af159de28c8dd47;hp=dce8d432411669a86df2b624db3894de2ce6fe50;hpb=dea46c447f6688f1519a6fbe7f5998d0eab7474c;p=clsql.git diff --git a/tests/test-fdml.lisp b/tests/test-fdml.lisp index dce8d43..f067e1e 100644 --- a/tests/test-fdml.lisp +++ b/tests/test-fdml.lisp @@ -478,6 +478,20 @@ :flatp t :result-types nil :field-names nil))) ("Lenin" "Stalin" "Trotsky" "Kruschev")) +;; test escaping of single quotes +(deftest :fdml/select/35 + (clsql:select "What's up doc?" :from [employee] :flatp t :field-names nil) + ("What's up doc?" "What's up doc?" "What's up doc?" "What's up doc?" + "What's up doc?" "What's up doc?" "What's up doc?" "What's up doc?" + "What's up doc?" "What's up doc?")) + +;; test proper treatment of backslash (depending on backend) +(deftest :fdml/select/36 + (clsql:select "foo\\bar\\baz" :from [employee] :flatp t :field-names nil) + ("foo\\bar\\baz" "foo\\bar\\baz" "foo\\bar\\baz" "foo\\bar\\baz" + "foo\\bar\\baz" "foo\\bar\\baz" "foo\\bar\\baz" "foo\\bar\\baz" + "foo\\bar\\baz" "foo\\bar\\baz")) + (deftest :fdml/do-query/1 (let ((result '())) (clsql:do-query ((name) [select [last-name] :from [employee] @@ -626,8 +640,7 @@ :flatp t) results) (apply #'values (nreverse results))) - nil :committed nil ("lenin-nospam@soviet.org") :committed - nil ("lenin@soviet.org")) + nil nil nil ("lenin-nospam@soviet.org") nil nil ("lenin@soviet.org")) ;; runs a valid update and an invalid one within a transaction and checks ;; that the valid update is rolled back when the invalid one fails.