MCPcopy Create free account
hub / github.com/go-git/go-git / TestLogPathWithError

Method TestLogPathWithError

repository_test.go:2213–2225  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

2211}
2212
2213func (s *RepositorySuite) TestLogPathWithError(c *C) {
2214 fileName := "README"
2215 pathIter := func(path string) bool {
2216 return path == fileName
2217 }
2218 cIter := object.NewCommitPathIterFromIter(pathIter, &mockErrCommitIter{}, false)
2219 defer cIter.Close()
2220
2221 err := cIter.ForEach(func(commit *object.Commit) error {
2222 return nil
2223 })
2224 c.Assert(err, NotNil)
2225}
2226
2227func (s *RepositorySuite) TestLogPathRegexpWithError(c *C) {
2228 pathRE := regexp.MustCompile("R.*E")

Callers

nothing calls this directly

Calls 3

CloseMethod · 0.65
ForEachMethod · 0.65

Tested by

no test coverage detected