tests for selecting slot values only
Mon Oct 19 06:31:05 PDT 2009 tomi.borbely@gmail.com
* tests for selecting slot values only
Warning: CRC errors found. These are probably harmless but should be repaired.
See 'darcs gzcrcs --help' for more information.
diff -rN -u old-cl-perec/cl-perec-test.asd new-cl-perec/cl-perec-test.asd
--- old-cl-perec/cl-perec-test.asd 2014-07-30 12:14:32.000000000 -0700
+++ new-cl-perec/cl-perec-test.asd 2014-07-30 12:14:32.000000000 -0700
@@ -70,6 +70,7 @@
(:file "order-by" :depends-on ("suite"))
(:file "purge" :depends-on ("suite"))
(:file "table-ref" :depends-on ("suite"))
+ (:file "select-list" :depends-on ("suite"))
(:file "polymorph" :depends-on ("suite"))
(:file "type" :depends-on ("suite"))
(:file "aggregate" :depends-on ("suite"))
diff -rN -u old-cl-perec/test/query/select-list.lisp new-cl-perec/test/query/select-list.lisp
--- old-cl-perec/test/query/select-list.lisp 1969-12-31 16:00:00.000000000 -0800
+++ new-cl-perec/test/query/select-list.lisp 2014-07-30 12:14:32.000000000 -0700
@@ -0,0 +1,34 @@
+(in-package :cl-perec-test)
+
+(defsuite* (test/query/select-list :in test/query))
+
+(defpclass* select-list-test ()
+ ((string-attr :type (text 50))
+ (or-null-string-attr :type (or null (text 50)))
+ (date-attr :type date)))
+
+(defixture select-list-data
+ (with-transaction
+ (purge-instances 'select-list-test)
+ (make-instance 'select-list-test
+ :string-attr "string1"
+ :date-attr (parse-datestring "2007-07-11"))
+ (make-instance 'select-list-test
+ :string-attr "String2"
+ :date-attr (parse-datestring "2007-07-15"))))
+
+(deftest test/query/select-list/select-columns/1 ()
+ (test-query (:select-count 1 :record-count 1 :fixture select-list-data)
+ (select ((string-attr-of o) (or-null-string-attr-of o))
+ (from (o select-list-test))
+ (where (timestamp<= (parse-datestring "2007-07-10")
+ (date-attr-of o)
+ (parse-datestring "2007-07-12"))))))
+
+(deftest test/query/select-list/select-columns/2 ()
+ (test-query (:select-count 1 :record-count 1 :fixture select-list-data)
+ (select ((string-attr-of o) (date-attr-of o))
+ (from (o select-list-test))
+ (where (timestamp<= (parse-datestring "2007-07-10")
+ (date-attr-of o)
+ (parse-datestring "2007-07-12"))))))
\ No newline at end of file