add check_test

This commit is contained in:
Shawn Smith
2021-06-04 17:46:47 +09:00
parent 158ee7b978
commit a2c8a0a395
2 changed files with 24 additions and 0 deletions

16
check/check_test.go Normal file
View File

@@ -0,0 +1,16 @@
package check
import (
"testing"
)
func TestRun(t *testing.T) {
cr, err := Run("testrepo")
if err != nil {
t.Fatal(err)
}
if cr.Issues != 2 {
t.Errorf("got cr.Issues = %d, want %d", cr.Issues, 2)
}
}

8
check/testrepo/a.go Normal file
View File

@@ -0,0 +1,8 @@
package main
import "fmt"
func main() {
// obivous typo
fmt.Println("invalid %s")
}