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

Method TestLogPathRegexpWithError

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

Source from the content-addressed store, hash-verified

2193}
2194
2195func (s *RepositorySuite) TestLogPathRegexpWithError(c *C) {
2196 pathRE := regexp.MustCompile("R.*E")
2197 pathIter := func(path string) bool {
2198 return pathRE.MatchString(path)
2199 }
2200 cIter := object.NewCommitPathIterFromIter(pathIter, &mockErrCommitIter{}, false)
2201 defer cIter.Close()
2202
2203 err := cIter.ForEach(func(commit *object.Commit) error {
2204 return nil
2205 })
2206 c.Assert(err, NotNil)
2207}
2208
2209func (s *RepositorySuite) TestLogPathFilterRegexp(c *C) {
2210 pathRE := regexp.MustCompile(`.*\.go`)

Callers

nothing calls this directly

Calls 3

CloseMethod · 0.65
ForEachMethod · 0.65

Tested by

no test coverage detected