db.postgresql: Enable postgresql tests on win64! YAY!!

db4
Doug Coleman 2014-07-08 01:26:12 -05:00
parent 05aabb13f4
commit 6612867742
1 changed files with 74 additions and 76 deletions

View File

@ -4,11 +4,10 @@ db.tuples db.types unicode.case accessors system db.tester ;
IN: db.postgresql.tests
os windows? cpu x86.64? and [
! Ensure the table exists
[ ] [ postgresql-test-db [ ] with-db ] unit-test
! Ensure the table exists
[ ] [ postgresql-test-db [ ] with-db ] unit-test
[ ] [
[ ] [
postgresql-test-db [
[ "drop table person;" sql-command ] ignore-errors
"create table person (name varchar(30), country varchar(30));"
@ -17,43 +16,43 @@ os windows? cpu x86.64? and [
"insert into person values('John', 'America');" sql-command
"insert into person values('Jane', 'New Zealand');" sql-command
] with-db
] unit-test
] unit-test
[
[
{
{ "John" "America" }
{ "Jane" "New Zealand" }
}
] [
] [
postgresql-test-db [
"select * from person" sql-query
] with-db
] unit-test
] unit-test
[
[
{
{ "John" "America" }
{ "Jane" "New Zealand" }
}
] [ postgresql-test-db [ "select * from person" sql-query ] with-db ] unit-test
] [ postgresql-test-db [ "select * from person" sql-query ] with-db ] unit-test
[
] [
[
] [
postgresql-test-db [
"insert into person(name, country) values('Jimmy', 'Canada')"
sql-command
] with-db
] unit-test
] unit-test
[
[
{
{ "John" "America" }
{ "Jane" "New Zealand" }
{ "Jimmy" "Canada" }
}
] [ postgresql-test-db [ "select * from person" sql-query ] with-db ] unit-test
] [ postgresql-test-db [ "select * from person" sql-query ] with-db ] unit-test
[
[
postgresql-test-db [
[
"insert into person(name, country) values('Jose', 'Mexico')" sql-command
@ -61,16 +60,16 @@ os windows? cpu x86.64? and [
"oops" throw
] with-transaction
] with-db
] must-fail
] must-fail
[ 3 ] [
[ 3 ] [
postgresql-test-db [
"select * from person" sql-query length
] with-db
] unit-test
] unit-test
[
] [
[
] [
postgresql-test-db [
[
"insert into person(name, country) values('Jose', 'Mexico')"
@ -79,11 +78,10 @@ os windows? cpu x86.64? and [
sql-command
] with-transaction
] with-db
] unit-test
] unit-test
[ 5 ] [
[ 5 ] [
postgresql-test-db [
"select * from person" sql-query length
] with-db
] unit-test
] unless
] unit-test