diff --git a/check/check_test.go b/check/check_test.go new file mode 100644 index 0000000..1a7be8a --- /dev/null +++ b/check/check_test.go @@ -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) + } +} diff --git a/check/testrepo/a.go b/check/testrepo/a.go new file mode 100644 index 0000000..a3fc55f --- /dev/null +++ b/check/testrepo/a.go @@ -0,0 +1,8 @@ +package main + +import "fmt" + + func main() { + // obivous typo + fmt.Println("invalid %s") +}