db.postgresql: Enable postgresql tests on win64! YAY!!
parent
05aabb13f4
commit
6612867742
|
@ -4,86 +4,84 @@ db.tuples db.types unicode.case accessors system db.tester ;
|
||||||
IN: db.postgresql.tests
|
IN: db.postgresql.tests
|
||||||
|
|
||||||
|
|
||||||
os windows? cpu x86.64? and [
|
! Ensure the table exists
|
||||||
! Ensure the table exists
|
[ ] [ postgresql-test-db [ ] with-db ] unit-test
|
||||||
[ ] [ postgresql-test-db [ ] with-db ] unit-test
|
|
||||||
|
|
||||||
[ ] [
|
[ ] [
|
||||||
postgresql-test-db [
|
postgresql-test-db [
|
||||||
[ "drop table person;" sql-command ] ignore-errors
|
[ "drop table person;" sql-command ] ignore-errors
|
||||||
"create table person (name varchar(30), country varchar(30));"
|
"create table person (name varchar(30), country varchar(30));"
|
||||||
sql-command
|
|
||||||
|
|
||||||
"insert into person values('John', 'America');" sql-command
|
|
||||||
"insert into person values('Jane', 'New Zealand');" sql-command
|
|
||||||
] with-db
|
|
||||||
] unit-test
|
|
||||||
|
|
||||||
[
|
|
||||||
{
|
|
||||||
{ "John" "America" }
|
|
||||||
{ "Jane" "New Zealand" }
|
|
||||||
}
|
|
||||||
] [
|
|
||||||
postgresql-test-db [
|
|
||||||
"select * from person" sql-query
|
|
||||||
] with-db
|
|
||||||
] unit-test
|
|
||||||
|
|
||||||
[
|
|
||||||
{
|
|
||||||
{ "John" "America" }
|
|
||||||
{ "Jane" "New Zealand" }
|
|
||||||
}
|
|
||||||
] [ 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
|
sql-command
|
||||||
] with-db
|
|
||||||
] unit-test
|
|
||||||
|
|
||||||
[
|
"insert into person values('John', 'America');" sql-command
|
||||||
{
|
"insert into person values('Jane', 'New Zealand');" sql-command
|
||||||
{ "John" "America" }
|
] with-db
|
||||||
{ "Jane" "New Zealand" }
|
] unit-test
|
||||||
{ "Jimmy" "Canada" }
|
|
||||||
}
|
|
||||||
] [ postgresql-test-db [ "select * from person" sql-query ] with-db ] unit-test
|
|
||||||
|
|
||||||
[
|
[
|
||||||
postgresql-test-db [
|
{
|
||||||
[
|
{ "John" "America" }
|
||||||
"insert into person(name, country) values('Jose', 'Mexico')" sql-command
|
{ "Jane" "New Zealand" }
|
||||||
"insert into person(name, country) values('Jose', 'Mexico')" sql-command
|
}
|
||||||
"oops" throw
|
] [
|
||||||
] with-transaction
|
postgresql-test-db [
|
||||||
] with-db
|
"select * from person" sql-query
|
||||||
] must-fail
|
] with-db
|
||||||
|
] unit-test
|
||||||
|
|
||||||
[ 3 ] [
|
[
|
||||||
postgresql-test-db [
|
{
|
||||||
"select * from person" sql-query length
|
{ "John" "America" }
|
||||||
] with-db
|
{ "Jane" "New Zealand" }
|
||||||
] unit-test
|
}
|
||||||
|
] [ postgresql-test-db [ "select * from person" sql-query ] with-db ] unit-test
|
||||||
|
|
||||||
[
|
[
|
||||||
] [
|
] [
|
||||||
postgresql-test-db [
|
postgresql-test-db [
|
||||||
[
|
"insert into person(name, country) values('Jimmy', 'Canada')"
|
||||||
"insert into person(name, country) values('Jose', 'Mexico')"
|
sql-command
|
||||||
sql-command
|
] with-db
|
||||||
"insert into person(name, country) values('Jose', 'Mexico')"
|
] unit-test
|
||||||
sql-command
|
|
||||||
] with-transaction
|
|
||||||
] with-db
|
|
||||||
] unit-test
|
|
||||||
|
|
||||||
[ 5 ] [
|
[
|
||||||
postgresql-test-db [
|
{
|
||||||
"select * from person" sql-query length
|
{ "John" "America" }
|
||||||
] with-db
|
{ "Jane" "New Zealand" }
|
||||||
] unit-test
|
{ "Jimmy" "Canada" }
|
||||||
] unless
|
}
|
||||||
|
] [ 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
|
||||||
|
"insert into person(name, country) values('Jose', 'Mexico')" sql-command
|
||||||
|
"oops" throw
|
||||||
|
] with-transaction
|
||||||
|
] with-db
|
||||||
|
] must-fail
|
||||||
|
|
||||||
|
[ 3 ] [
|
||||||
|
postgresql-test-db [
|
||||||
|
"select * from person" sql-query length
|
||||||
|
] with-db
|
||||||
|
] unit-test
|
||||||
|
|
||||||
|
[
|
||||||
|
] [
|
||||||
|
postgresql-test-db [
|
||||||
|
[
|
||||||
|
"insert into person(name, country) values('Jose', 'Mexico')"
|
||||||
|
sql-command
|
||||||
|
"insert into person(name, country) values('Jose', 'Mexico')"
|
||||||
|
sql-command
|
||||||
|
] with-transaction
|
||||||
|
] with-db
|
||||||
|
] unit-test
|
||||||
|
|
||||||
|
[ 5 ] [
|
||||||
|
postgresql-test-db [
|
||||||
|
"select * from person" sql-query length
|
||||||
|
] with-db
|
||||||
|
] unit-test
|
Loading…
Reference in New Issue