good morning!!!!

Skip to content
Snippets Groups Projects
Commit 7bf76255 authored by Garet Halliday's avatar Garet Halliday
Browse files

copy out tests

parent 46edbea7
No related branches found
No related tags found
No related merge requests found
...@@ -47,6 +47,8 @@ func TestTester(t *testing.T) { ...@@ -47,6 +47,8 @@ func TestTester(t *testing.T) {
tests.EQP6, tests.EQP6,
tests.EQP7, tests.EQP7,
tests.EQP8, tests.EQP8,
tests.CopyOut0,
tests.CopyOut1,
); err != nil { ); err != nil {
fmt.Print(err.Error()) fmt.Print(err.Error())
t.Fail() t.Fail()
......
package tests
import (
"pggat/test"
"pggat/test/inst"
)
var CopyOut0 = test.Test{
Name: "Copy Out 0",
Instructions: []inst.Instruction{
inst.SimpleQuery("CREATE TABLE test ( x integer NOT NULL, y varchar(40) NOT NULL PRIMARY KEY )"),
inst.SimpleQuery("INSERT INTO test VALUES (123, 'hello world')"),
inst.SimpleQuery("INSERT INTO test VALUES (-324, 'garet was here')"),
inst.SimpleQuery("COPY test TO STDOUT"),
inst.SimpleQuery("DROP TABLE test"),
},
}
var CopyOut1 = test.Test{
Name: "Copy Out 1",
Instructions: []inst.Instruction{
inst.SimpleQuery("CREATE TABLE test ( x integer NOT NULL, y varchar(40) NOT NULL PRIMARY KEY )"),
inst.SimpleQuery("INSERT INTO test VALUES (123, 'hello world')"),
inst.SimpleQuery("INSERT INTO test VALUES (-324, 'garet was here')"),
inst.Parse{
Query: "COPY test TO STDOUT",
},
inst.DescribePreparedStatement(""),
inst.Bind{},
inst.DescribePortal(""),
inst.Execute(""),
inst.Sync{},
inst.SimpleQuery("DROP TABLE test"),
},
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment