tinygo: support -run for tests

Fixes #2294
This commit is contained in:
Damian Gryski
2021-11-19 14:14:21 -08:00
committed by Ron Evans
parent 18242bc26a
commit a536ddcda8
3 changed files with 52 additions and 10 deletions
+5 -1
View File
@@ -34,9 +34,13 @@ var benchmarks = []testing.InternalBenchmark{}
var examples = []testing.InternalExample{}
func main() {
m := testing.MainStart(nil, tests, benchmarks, examples)
m := testing.MainStart(testdeps{}, tests, benchmarks, examples)
exitcode := m.Run()
if exitcode != 0 {
println("exitcode:", exitcode)
}
}
type testdeps struct{}
func (testdeps) MatchString(pat, str string) (bool, error) { return true, nil }