projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed sqlite bug where sqlite-aref was called with incorrect args (thanks Zach)
[clsql.git]
/
tests
/
test-fddl.lisp
diff --git
a/tests/test-fddl.lisp
b/tests/test-fddl.lisp
index 04d310ec86454fadfe7e22463bc76c10ff2e3f8c..41e79d527441ec45745372bd748894dfd8852ef6 100644
(file)
--- a/
tests/test-fddl.lisp
+++ b/
tests/test-fddl.lisp
@@
-16,8
+16,7
@@
(in-package #:clsql-tests)
(in-package #:clsql-tests)
-
-#.(clsql:locally-enable-sql-reader-syntax)
+(clsql-sys:file-enable-sql-reader-syntax)
(def-dataset *ds-fddl*
(:setup (lambda ()
(def-dataset *ds-fddl*
(:setup (lambda ()
@@
-45,9
+44,11
@@
B varchar(32))")
;; list current tables
(deftest :fddl/table/1
(with-dataset *ds-fddl*
;; list current tables
(deftest :fddl/table/1
(with-dataset *ds-fddl*
- (sort (mapcar #'string-downcase
- (clsql:list-tables ))
- #'string<))
+ (let ((tables (sort (mapcar #'string-downcase (clsql:list-tables))
+ #'string<)))
+ ;; sqlite has a table for autoincrement sequences that we dont care about if
+ ;; it exists
+ (remove "sqlite_sequence" tables :test #'string-equal)))
("alpha" "bravo"))
;; create a table, test for its existence, drop it and test again
("alpha" "bravo"))
;; create a table, test for its existence, drop it and test again
@@
-106,7
+107,7
@@
B varchar(32))")
(progn
(let ((*backend-warning-behavior*
(if (member *test-database-type*
(progn
(let ((*backend-warning-behavior*
(if (member *test-database-type*
- '(:postgresql :postgresql-socket))
+ '(:postgresql :postgresql-socket
:postgresql-socket3
))
:ignore
:warn)))
(case *test-database-underlying-type*
:ignore
:warn)))
(case *test-database-underlying-type*
@@
-128,7
+129,7
@@
B varchar(32))")
(progn
(let ((*backend-warning-behavior*
(if (member *test-database-type*
(progn
(let ((*backend-warning-behavior*
(if (member *test-database-type*
- '(:postgresql :postgresql-socket))
+ '(:postgresql :postgresql-socket
:postgresql-socket3
))
:ignore
:warn)))
(clsql:create-table [foo] '(([bar] integer :not-null)
:ignore
:warn)))
(clsql:create-table [foo] '(([bar] integer :not-null)
@@
-169,7
+170,8
@@
B varchar(32))")
(with-dataset *ds-fddl*
(multiple-value-bind (type length scale nullable)
(clsql:attribute-type [c] [alpha])
(with-dataset *ds-fddl*
(multiple-value-bind (type length scale nullable)
(clsql:attribute-type [c] [alpha])
- (values (clsql-sys:in type :varchar :varchar2) length scale nullable)))
+ (values (clsql-sys:in type :varchar :varchar2 :nvarchar)
+ length scale nullable)))
t 30 nil 1)
(deftest :fddl/attributes/5
t 30 nil 1)
(deftest :fddl/attributes/5
@@
-450,5
+452,3
@@
B varchar(32))")
(nil (t nil) t (t nil)))
))
(nil (t nil) t (t nil)))
))
-
-#.(clsql:restore-sql-reader-syntax-state)