test: check for errors when globbing test packages

This commit is contained in:
Ayke van Laethem
2018-12-12 14:26:33 +01:00
parent 5a509f5bfe
commit 222c4c75b1
+3
View File
@@ -23,6 +23,9 @@ func TestCompiler(t *testing.T) {
}
dirMatches, err := filepath.Glob(TESTDATA + "/*/main.go")
if err != nil {
t.Fatal("could not read test packages:", err)
}
if len(matches) == 0 || len(dirMatches) == 0 {
t.Fatal("no test files found")
}