diff options
| author | Carlos Martín Nieto <[email protected]> | 2013-09-09 14:21:16 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2013-09-09 14:21:16 +0200 |
| commit | 3cbfdf37f48c7b2f8726ad7e60a963cae1d8fd21 (patch) | |
| tree | 024cf8bf2de8962c862232390ff212ff342e4d7a /object_test.go | |
| parent | 22f43840aac638b43bc963a6515c9c814bac3b72 (diff) | |
Add Filemode to TreeEntry
This field was missing, so let's add it, and let's add the const
definitions for the modes while we're here.
Diffstat (limited to 'object_test.go')
| -rw-r--r-- | object_test.go | 7 |
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") |
