Added main template test file, fixed errors
* Fixed TestTemplates bug (now shows compile errors properly) * Fixed all compile errors for templates (except test templates) * Added conditional imports for column types
This commit is contained in:
parent
3b0a5e80a1
commit
48a9ba8d29
13 changed files with 242 additions and 57 deletions
|
@ -61,12 +61,15 @@ func TestTemplates(t *testing.T) {
|
|||
}
|
||||
defer tplTestHandle.Close()
|
||||
|
||||
fmt.Fprintf(tplTestHandle, "package %s", cmdData.PkgName)
|
||||
fmt.Fprintf(tplTestHandle, "package %s\n", cmdData.PkgName)
|
||||
|
||||
buf := bytes.Buffer{}
|
||||
cmd := exec.Command("go", "test", tplFile)
|
||||
buf2 := bytes.Buffer{}
|
||||
|
||||
cmd := exec.Command("go", "test")
|
||||
cmd.Dir = cmdData.OutFolder
|
||||
cmd.Stderr = &buf
|
||||
cmd.Stdout = &buf2
|
||||
|
||||
if err = cmd.Run(); err != nil {
|
||||
t.Errorf("go test cmd execution failed: %s\n\n%s", err, buf.String())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue