aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--repository_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/repository_test.go b/repository_test.go
index 65c1423..06b748a 100644
--- a/repository_test.go
+++ b/repository_test.go
@@ -1668,6 +1668,17 @@ func (m *mockErrCommitIter) Close() {}
func (s *RepositorySuite) TestLogFileWithError(c *C) {
fileName := "README"
+ cIter := object.NewCommitFileIterFromIter(fileName, &mockErrCommitIter{}, false)
+ defer cIter.Close()
+
+ err := cIter.ForEach(func(commit *object.Commit) error {
+ return nil
+ })
+ c.Assert(err, NotNil)
+}
+
+func (s *RepositorySuite) TestLogPathWithError(c *C) {
+ fileName := "README"
pathIter := func(path string) bool {
return path == fileName
}