projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r9741: 8 Jul 2004 Kevin Rosenberg <kevin@rosenberg.net>
[clsql.git]
/
tests
/
test-syntax.lisp
diff --git
a/tests/test-syntax.lisp
b/tests/test-syntax.lisp
index 8591817cf58cf58d68c53d50942fc3b26f8ed34c..69265fefde6cc9dd1685c93976d8ad4c79946c7e 100644
(file)
--- a/
tests/test-syntax.lisp
+++ b/
tests/test-syntax.lisp
@@
-206,6
+206,10
@@
(deftest :syntax/substr/1
(clsql:sql [substr [hello] 1 4])
(deftest :syntax/substr/1
(clsql:sql [substr [hello] 1 4])
+ "SUBSTR(HELLO,1,4)")
+
+(deftest :syntax/substring/1
+ (clsql:sql [substring [hello] 1 4])
"SUBSTRING(HELLO,1,4)")
"SUBSTRING(HELLO,1,4)")
@@
-213,6
+217,10
@@
(clsql:sql [|| [foo] [bar] [baz]])
"(FOO || BAR || BAZ)")
(clsql:sql [|| [foo] [bar] [baz]])
"(FOO || BAR || BAZ)")
+(deftest :syntax/concat/2
+ (clsql:sql [concat [foo] [bar]])
+ "CONCAT(FOO,BAR)")
+
(deftest :syntax/pattern/1
(clsql:sql [like [foo] "%v"])
(deftest :syntax/pattern/1
(clsql:sql [like [foo] "%v"])
@@
-249,6
+257,11
@@
(clsql:sql [nvl [foo] "not specified"])
"COALESCE(FOO,'not specified')")
(clsql:sql [nvl [foo] "not specified"])
"COALESCE(FOO,'not specified')")
+(deftest :syntax/nvl/1
+ (clsql:sql [nvl [foo] "not specified"])
+ "COALESCE(FOO,'not specified')")
+
+
(deftest :syntax/sets/1
(clsql:sql [union [select [foo] :from [bar]] [select [baz] :from [bar]]])
(deftest :syntax/sets/1
(clsql:sql [union [select [foo] :from [bar]] [select [baz] :from [bar]]])
@@
-264,7
+277,7
@@
(deftest :syntax/sets/4
(clsql:sql [minus [select [foo] :from [bar]] [select [baz] :from [bar]]])
(deftest :syntax/sets/4
(clsql:sql [minus [select [foo] :from [bar]] [select [baz] :from [bar]]])
- "SELECT FOO FROM BAR
EXCEPT
SELECT BAZ FROM BAR")
+ "SELECT FOO FROM BAR
MINUS
SELECT BAZ FROM BAR")
(deftest :syntax/function/1
(deftest :syntax/function/1