Skip to content

Commit cf05f2b

Browse files
fcharliechrisd8088
andauthoredAug 8, 2024··
Update commit_test.go
Co-authored-by: Chris Darroch <[email protected]>
1 parent 804b1df commit cf05f2b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
 

‎commit_test.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -456,14 +456,15 @@ func TestCommitEqualReturnsTrueWhenBothCommitsAreNil(t *testing.T) {
456456
assert.True(t, c1.Equal(c2))
457457
}
458458

459-
func TestBadCommit(t *testing.T) {
459+
func TestCommitInvalidMultilineNonExtraHeader(t *testing.T) {
460460
cc := `tree 2aedfd35087c75d17bdbaf4dd56069d44fc75b71
461461
parent 75158117eb8efe60453f8c077527ac3530c81e38
462-
author Credit Card Account <Credit Card Account> 1722305889 +0800
463-
committer \346\244\260\346\235\215
464-
<Credit Card Account> 1722305889 +0800
462+
author Jane Doe <jane@example.com> 1503956287 -0400
463+
committer Jane Doe <jane@example.com> 1503956287 -0400
464+
foo bar
465+
466+
initial commit`
465467

466-
Credit Card Account`
467468
var c Commit
468469
_, err := c.Decode(sha1.New(), strings.NewReader(cc), int64(len(cc)))
469470
assert.NoError(t, err)

0 commit comments

Comments
 (0)
Please sign in to comment.