(c *C)
| 1968 | } |
| 1969 | |
| 1970 | func (s *RepositorySuite) TestLogFileNext(c *C) { |
| 1971 | r, _ := Init(memory.NewStorage(), nil) |
| 1972 | err := r.clone(context.Background(), &CloneOptions{ |
| 1973 | URL: s.GetBasicLocalRepositoryURL(), |
| 1974 | }) |
| 1975 | |
| 1976 | c.Assert(err, IsNil) |
| 1977 | |
| 1978 | fileName := "vendor/foo.go" |
| 1979 | cIter, err := r.Log(&LogOptions{FileName: &fileName}) |
| 1980 | |
| 1981 | c.Assert(err, IsNil) |
| 1982 | |
| 1983 | commitOrder := []plumbing.Hash{ |
| 1984 | plumbing.NewHash("6ecf0ef2c2dffb796033e5a02219af86ec6584e5"), |
| 1985 | } |
| 1986 | |
| 1987 | for _, o := range commitOrder { |
| 1988 | commit, err := cIter.Next() |
| 1989 | c.Assert(err, IsNil) |
| 1990 | c.Assert(commit.Hash, Equals, o) |
| 1991 | } |
| 1992 | _, err = cIter.Next() |
| 1993 | c.Assert(err, Equals, io.EOF) |
| 1994 | } |
| 1995 | |
| 1996 | func (s *RepositorySuite) TestLogFileForEach(c *C) { |
| 1997 | r, _ := Init(memory.NewStorage(), nil) |
nothing calls this directly
no test coverage detected