(c *C)
| 2000 | } |
| 2001 | |
| 2002 | func (s *RepositorySuite) TestLogFileNext(c *C) { |
| 2003 | r, _ := Init(memory.NewStorage(), nil) |
| 2004 | err := r.clone(context.Background(), &CloneOptions{ |
| 2005 | URL: s.GetBasicLocalRepositoryURL(), |
| 2006 | }) |
| 2007 | |
| 2008 | c.Assert(err, IsNil) |
| 2009 | |
| 2010 | fileName := "vendor/foo.go" |
| 2011 | cIter, err := r.Log(&LogOptions{FileName: &fileName}) |
| 2012 | |
| 2013 | c.Assert(err, IsNil) |
| 2014 | |
| 2015 | commitOrder := []plumbing.Hash{ |
| 2016 | plumbing.NewHash("6ecf0ef2c2dffb796033e5a02219af86ec6584e5"), |
| 2017 | } |
| 2018 | |
| 2019 | for _, o := range commitOrder { |
| 2020 | commit, err := cIter.Next() |
| 2021 | c.Assert(err, IsNil) |
| 2022 | c.Assert(commit.Hash, Equals, o) |
| 2023 | } |
| 2024 | _, err = cIter.Next() |
| 2025 | c.Assert(err, Equals, io.EOF) |
| 2026 | } |
| 2027 | |
| 2028 | func (s *RepositorySuite) TestLogFileForEach(c *C) { |
| 2029 | r, _ := Init(memory.NewStorage(), nil) |
nothing calls this directly
no test coverage detected