aboutsummaryrefslogtreecommitdiffstats
path: root/tree_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tree_test.go')
-rw-r--r--tree_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/tree_test.go b/tree_test.go
index bec55dd..803ec56 100644
--- a/tree_test.go
+++ b/tree_test.go
@@ -192,7 +192,9 @@ func (s *SuiteTree) TestFiles(c *C) {
tree := commit.Tree()
var output []string
- for file := range tree.Files() {
+ iter := tree.Files()
+ defer iter.Close()
+ for file, err := iter.Next(); err == nil; file, err = iter.Next() {
output = append(output, file.Name)
}
sort.Strings(output)