From a2c8a0a395a8fb202e75f12ae81a3d5c5e65c098 Mon Sep 17 00:00:00 2001 From: Shawn Smith Date: Fri, 4 Jun 2021 17:46:47 +0900 Subject: [PATCH] add check_test --- check/check_test.go | 16 ++++++++++++++++ check/testrepo/a.go | 8 ++++++++ 2 files changed, 24 insertions(+) create mode 100644 check/check_test.go create mode 100644 check/testrepo/a.go 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") +}