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

Method TestLogPathRegexpWithError

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

Source from the content-addressed store, hash-verified

2225}
2226
2227func (s *RepositorySuite) TestLogPathRegexpWithError(c *C) {
2228 pathRE := regexp.MustCompile("R.*E")
2229 pathIter := func(path string) bool {
2230 return pathRE.MatchString(path)
2231 }
2232 cIter := object.NewCommitPathIterFromIter(pathIter, &mockErrCommitIter{}, false)
2233 defer cIter.Close()
2234
2235 err := cIter.ForEach(func(commit *object.Commit) error {
2236 return nil
2237 })
2238 c.Assert(err, NotNil)
2239}
2240
2241func (s *RepositorySuite) TestLogPathFilterRegexp(c *C) {
2242 pathRE := regexp.MustCompile(`.*\.go`)

Callers

nothing calls this directly

Calls 3

CloseMethod · 0.65
ForEachMethod · 0.65

Tested by

no test coverage detected