summaryrefslogtreecommitdiff
path: root/object_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'object_test.go')
-rw-r--r--object_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/object_test.go b/object_test.go
index 82dce98..41efecf 100644
--- a/object_test.go
+++ b/object_test.go
@@ -33,10 +33,15 @@ func TestObjectPoymorphism(t *testing.T) {
t.Fatalf("Converting back to *Tree is not ok")
}
- if tree2.EntryByName("README") == nil {
+ entry := tree2.EntryByName("README")
+ if entry == nil {
t.Fatalf("Tree did not have expected \"README\" entry")
}
+ if entry.Filemode != FilemodeBlob {
+ t.Fatal("Wrong filemode for \"README\"")
+ }
+
_, ok = obj.(*Commit)
if ok {
t.Fatalf("*Tree is somehow the same as *Commit")