We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0378b2 commit 027dadfCopy full SHA for 027dadf
repository_test.go
@@ -1667,6 +1667,17 @@ func (m *mockErrCommitIter) ForEach(func(*object.Commit) error) error {
1667
func (m *mockErrCommitIter) Close() {}
1668
1669
func (s *RepositorySuite) TestLogFileWithError(c *C) {
1670
+ fileName := "README"
1671
+ cIter := object.NewCommitFileIterFromIter(fileName, &mockErrCommitIter{}, false)
1672
+ defer cIter.Close()
1673
+
1674
+ err := cIter.ForEach(func(commit *object.Commit) error {
1675
+ return nil
1676
+ })
1677
+ c.Assert(err, NotNil)
1678
+}
1679
1680
+func (s *RepositorySuite) TestLogPathWithError(c *C) {
1681
fileName := "README"
1682
pathIter := func(path string) bool {
1683
return path == fileName
0 commit comments