diff --git a/cmd/phpgrep/end2end_test.go b/cmd/phpgrep/end2end_test.go index 4294aec..3d96cde 100644 --- a/cmd/phpgrep/end2end_test.go +++ b/cmd/phpgrep/end2end_test.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "os" "os/exec" "path/filepath" @@ -219,6 +220,7 @@ func TestEnd2End(t *testing.T) { } have := strings.Split(strings.TrimSpace(string(out)), "\n") want := test.matches + want = append(want, fmt.Sprintf("found %d matches", len(test.matches))) if diff := cmp.Diff(want, have); diff != "" { t.Errorf("output mismatch (+have -want):\n%s", diff) } diff --git a/internal/phpgrep/program.go b/internal/phpgrep/program.go index ee66983..906109d 100644 --- a/internal/phpgrep/program.go +++ b/internal/phpgrep/program.go @@ -188,6 +188,7 @@ func (p *program) printMatches() error { } } } + log.Printf("found %d matches", printed) return nil }