aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object/tree_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-04-11 20:03:00 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2017-04-11 04:38:46 +0200
commitaa818a3f77e6ff06765cf8c246f8708df3d190a7 (patch)
tree302a5671cfa192f5417ffd5dd5c59447e71e2cb2 /plumbing/object/tree_test.go
parentaf4f25df56c74b05ae04cc6f2fcac38db1130249 (diff)
downloadgo-git-aa818a3f77e6ff06765cf8c246f8708df3d190a7.tar.gz
plumbing: object, public Tree.FindEntry and minor diff changes
Diffstat (limited to 'plumbing/object/tree_test.go')
-rw-r--r--plumbing/object/tree_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/plumbing/object/tree_test.go b/plumbing/object/tree_test.go
index cf5ad5f..aa86517 100644
--- a/plumbing/object/tree_test.go
+++ b/plumbing/object/tree_test.go
@@ -107,6 +107,12 @@ func (s *TreeSuite) TestFiles(c *C) {
c.Assert(count, Equals, 9)
}
+func (s *TreeSuite) TestFindEntry(c *C) {
+ e, err := s.Tree.FindEntry("vendor/foo.go")
+ c.Assert(err, IsNil)
+ c.Assert(e.Name, Equals, "foo.go")
+}
+
// This plumbing.EncodedObject implementation has a reader that only returns 6
// bytes at a time, this should simulate the conditions when a read
// returns less bytes than asked, for example when reading a hash which