aboutsummaryrefslogtreecommitdiffstats
path: root/file_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'file_test.go')
-rw-r--r--file_test.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/file_test.go b/file_test.go
index e3b9b4b..d9024b0 100644
--- a/file_test.go
+++ b/file_test.go
@@ -125,7 +125,9 @@ func (s *SuiteFile) TestContents(c *C) {
file, err := commit.File(t.path)
c.Assert(err, IsNil)
- c.Assert(file.Contents(), Equals, t.contents, Commentf(
+ content, err := file.Contents()
+ c.Assert(err, IsNil)
+ c.Assert(content, Equals, t.contents, Commentf(
"subtest %d: commit=%s, path=%s", i, t.commit, t.path))
}
}
@@ -172,7 +174,9 @@ func (s *SuiteFile) TestLines(c *C) {
file, err := commit.File(t.path)
c.Assert(err, IsNil)
- c.Assert(file.Lines(), DeepEquals, t.lines, Commentf(
+ lines, err := file.Lines()
+ c.Assert(err, IsNil)
+ c.Assert(lines, DeepEquals, t.lines, Commentf(
"subtest %d: commit=%s, path=%s", i, t.commit, t.path))
}
}
@@ -201,7 +205,7 @@ func (s *SuiteFile) TestIgnoreEmptyDirEntries(c *C) {
iter := commit.Tree().Files()
defer iter.Close()
for file, err := iter.Next(); err == nil; file, err = iter.Next() {
- _ = file.Contents()
+ _, _ = file.Contents()
// this would probably panic if we are not ignoring empty dirs
}
}