Skip to content

Commit b068af5

Browse files
committed
Run all tests via go test
1 parent 2ebfa57 commit b068af5

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.semaphore/semaphore.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,3 @@ blocks:
1515
- checkout
1616
- sem-version go 1.12
1717
- go test -v ./...
18-
- go build testdata/ondeck/db.go
19-
- go build testdata/ondeck/prepared.go

parser_test.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package dinosql
33
import (
44
"io/ioutil"
55
"log"
6+
"os/exec"
67
"path/filepath"
78
"testing"
89

@@ -114,3 +115,19 @@ func TestParseSchema(t *testing.T) {
114115
}
115116
})
116117
}
118+
119+
func TestCompile(t *testing.T) {
120+
files := []string{
121+
filepath.Join("testdata", "ondeck", "db.go"),
122+
filepath.Join("testdata", "ondeck", "prepared.go"),
123+
}
124+
for _, filename := range files {
125+
f := filename
126+
t.Run(f, func(t *testing.T) {
127+
output, err := exec.Command("go", "build", f).CombinedOutput()
128+
if err != nil {
129+
t.Errorf("%s: %s:", err, string(output))
130+
}
131+
})
132+
}
133+
}

0 commit comments

Comments
 (0)