diff options
Diffstat (limited to 'modules/git/parse_gogit_test.go')
-rw-r--r-- | modules/git/parse_gogit_test.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/git/parse_gogit_test.go b/modules/git/parse_gogit_test.go index cf38c29932..c6374133c0 100644 --- a/modules/git/parse_gogit_test.go +++ b/modules/git/parse_gogit_test.go @@ -24,7 +24,7 @@ func TestParseTreeEntries(t *testing.T) { Expected: []*TreeEntry{}, }, { - Input: "100644 blob 61ab7345a1a3bbc590068ccae37b8515cfc5843c\texample/file2.txt\n", + Input: "100644 blob 61ab7345a1a3bbc590068ccae37b8515cfc5843c 1022\texample/file2.txt\n", Expected: []*TreeEntry{ { ID: MustIDFromString("61ab7345a1a3bbc590068ccae37b8515cfc5843c"), @@ -33,12 +33,14 @@ func TestParseTreeEntries(t *testing.T) { Name: "example/file2.txt", Mode: filemode.Regular, }, + size: 1022, + sized: true, }, }, }, { - Input: "120000 blob 61ab7345a1a3bbc590068ccae37b8515cfc5843c\t\"example/\\n.txt\"\n" + - "040000 tree 1d01fb729fb0db5881daaa6030f9f2d3cd3d5ae8\texample\n", + Input: "120000 blob 61ab7345a1a3bbc590068ccae37b8515cfc5843c 234131\t\"example/\\n.txt\"\n" + + "040000 tree 1d01fb729fb0db5881daaa6030f9f2d3cd3d5ae8 -\texample\n", Expected: []*TreeEntry{ { ID: MustIDFromString("61ab7345a1a3bbc590068ccae37b8515cfc5843c"), @@ -47,9 +49,12 @@ func TestParseTreeEntries(t *testing.T) { Name: "example/\n.txt", Mode: filemode.Symlink, }, + size: 234131, + sized: true, }, { - ID: MustIDFromString("1d01fb729fb0db5881daaa6030f9f2d3cd3d5ae8"), + ID: MustIDFromString("1d01fb729fb0db5881daaa6030f9f2d3cd3d5ae8"), + sized: true, gogitTreeEntry: &object.TreeEntry{ Hash: MustIDFromString("1d01fb729fb0db5881daaa6030f9f2d3cd3d5ae8"), Name: "example", |