tools.deploy.test.17: database deployment test

db4
Slava Pestov 2009-11-20 03:23:15 -06:00
parent ffd7de02d6
commit 10800a009a
3 changed files with 47 additions and 0 deletions

View File

@ -115,3 +115,5 @@ os macosx? [
] unit-test
[ ] [ "tools.deploy.test.16" shake-and-bake run-temp-image ] unit-test
[ ] [ "tools.deploy.test.17" shake-and-bake run-temp-image ] unit-test

View File

@ -0,0 +1,31 @@
USING: accessors calendar db db.sqlite db.tuples db.types
io.files.temp kernel urls ;
IN: tools.deploy.test.17
TUPLE: person name birthday homepage occupation ;
person "PEOPLE" {
{ "name" "NAME" { VARCHAR 256 } +not-null+ +user-assigned-id+ }
{ "birthday" "BIRTHDAY" DATETIME +not-null+ }
{ "homepage" "HOMEPAGE" URL +not-null+ }
{ "occupation" "OCCUPATION" { VARCHAR 256 } +not-null+ }
} define-persistent
: db-deploy-test ( -- ) ;
"test.db" temp-file <sqlite-db> [
person recreate-table
person new
"Stephen Hawking" >>name
timestamp new 8 >>day 0 >>month 1942 >>year >>birthday
"http://en.wikipedia.org/wiki/Stephen_Hawking" >url >>homepage
"Dope MC" >>occupation
dup
insert-tuple
person new
"Stephen Hawking" >>name
select-tuple
assert=
] with-db ;
MAIN: db-deploy-test

View File

@ -0,0 +1,14 @@
USING: tools.deploy.config ;
H{
{ deploy-name "tools.deploy.test.17" }
{ deploy-ui? f }
{ deploy-c-types? f }
{ deploy-unicode? f }
{ "stop-after-last-window?" t }
{ deploy-io 3 }
{ deploy-reflection 5 }
{ deploy-word-props? f }
{ deploy-math? t }
{ deploy-threads? t }
{ deploy-word-defs? f }
}